Exemple #1
0
 def test_netloc(self, url, expected_netloc):
     assert parse_url(url).netloc == expected_netloc
Exemple #2
0
 def test_request_uri(self, url, expected_request_uri):
     returned_url = parse_url(url)
     assert returned_url.request_uri == expected_request_uri
Exemple #3
0
 def test_parse_url(self, url, expected_url):
     returned_url = parse_url(url)
     assert returned_url == expected_url
Exemple #4
0
 def test_parse_url_invalid_IPv6(self):
     with pytest.raises(ValueError):
         parse_url('[::1')
Exemple #5
0
 def test_parse_url_normalization(self, url, expected_normalized_url):
     """Assert parse_url normalizes the scheme/host, and only the scheme/host"""
     actual_normalized_url = parse_url(url).url
     assert actual_normalized_url == expected_normalized_url