Exemple #1
0
 def test_host_tld_ftp(self):
     self.assertEqual(t.url("ftp://foo.com"), 'ftp://example.com')
Exemple #2
0
 def test_host_tld(self):
     self.assertEqual(t.url("http://foo.com"), 'http://example.com')
Exemple #3
0
 def test_host_domain_path(self):
     self.assertEqual(t.url("https://foo.bar.stuff.com/path/to/thing?query=42#pound"),
                      'https://royce.earthquake.example.com/path/to/thing?query=42#pound')
Exemple #4
0
 def test_empty(self):
     self.assertEqual(t.url(""), '')
Exemple #5
0
 def test_host_domain(self):
     self.assertEqual(t.url("https://foo.bar.com"), 'https://royce.example.com')