Ejemplo n.º 1
0
 def test_host_tld_ftp(self):
     self.assertEqual(t.url("ftp://foo.com"), 'ftp://example.com')
Ejemplo n.º 2
0
 def test_host_tld(self):
     self.assertEqual(t.url("http://foo.com"), 'http://example.com')
Ejemplo n.º 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')
Ejemplo n.º 4
0
 def test_empty(self):
     self.assertEqual(t.url(""), '')
Ejemplo n.º 5
0
 def test_host_domain(self):
     self.assertEqual(t.url("https://foo.bar.com"), 'https://royce.example.com')