utils: let select_proxy not raise an exception when url has no hostname

This commit is contained in:
John R. Lenton
2016-04-26 11:21:54 +01:00
parent bbeb0001cd
commit 4e7beef860
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -325,6 +325,7 @@ def test_dotted_netmask(mask, expected):
('hTTp://u:p@Some.Host/path', 'http://some.host.proxy'),
('hTTp://u:p@Other.Host/path', 'http://http.proxy'),
('hTTps://Other.Host', None),
('file:///etc/motd', None),
))
def test_select_proxies(url, expected):
"""Make sure we can select per-host proxies correctly."""