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)
def protocol(self): return helpers.protocol(self.url)