Ejemplo n.º 1
0
 def test_domain_protocol(self):
     """Test domain extraction from URLs, for HTTP, about:, chrome."""
     test_domains = (
         ('http://example.com', 'http', 'example.com'),
         ('https://example.net:8080/abc', 'https', 'example.net:8080'),
         ('about:config', 'about', 'config'),
         ('chrome://something/exciting', 'chrome', 'something/exciting'),
     )
     for url, protocol, domain in test_domains:
         eq_(helpers.protocol(url), protocol)
         eq_(helpers.domain(url), domain)
Ejemplo n.º 2
0
 def test_domain_protocol(self):
     """Test domain extraction from URLs, for HTTP, about:, chrome."""
     test_domains = (
         ('http://example.com', 'http', 'example.com'),
         ('https://example.net:8080/abc', 'https', 'example.net:8080'),
         ('about:config', 'about', 'config'),
         ('chrome://something/exciting', 'chrome', 'something/exciting'),
     )
     for url, protocol, domain in test_domains:
         eq_(helpers.protocol(url), protocol)
         eq_(helpers.domain(url), domain)
Ejemplo n.º 3
0
 def domain(self):
     return helpers.domain(self.url)