예제 #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)
예제 #2
0
파일: tests.py 프로젝트: tofumatt/reporter
 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)
예제 #3
0
 def protocol(self):
     return helpers.protocol(self.url)