Ejemplo n.º 1
0
 def test_no_port_http(self):
     self.assertEqual(extract_host_port('http://localhost/'),
                      ('localhost', 80, 'http'))
Ejemplo n.º 2
0
 def test_basic(self):
     self.assertEqual(extract_host_port('http://localhost:80/'),
                      ('localhost', 80, 'http'))
Ejemplo n.º 3
0
 def test_no_scheme(self):
     self.assertEqual(extract_host_port('//localhost/'),
                      ('localhost', 80, 'http'))
Ejemplo n.º 4
0
 def test_no_port_https(self):
     self.assertEqual(extract_host_port('https://localhost/'),
                      ('localhost', 443, 'https'))
Ejemplo n.º 5
0
 def test_no_port_https(self):
     self.assertEqual(extract_host_port('https://localhost/'),
         ('localhost', 443, 'https'))
Ejemplo n.º 6
0
 def test_no_port_http(self):
     self.assertEqual(extract_host_port('http://localhost/'),
         ('localhost', 80, 'http'))
Ejemplo n.º 7
0
 def test_no_scheme(self):
     self.assertEqual(extract_host_port('//localhost/'),
         ('localhost', 80, 'http'))
Ejemplo n.º 8
0
 def test_basic(self):
     self.assertEqual(extract_host_port('http://localhost:80/'),
         ('localhost', 80, 'http'))