proxy_from_url: fix PACFetcher construction
This commit is contained in:
parent
ea2eefccb1
commit
19966a9b9f
@ -614,7 +614,7 @@ def proxy_from_url(url):
|
||||
|
||||
scheme = url.scheme()
|
||||
if scheme in ['pac+http', 'pac+https']:
|
||||
return pac.PACFetcher
|
||||
return pac.PACFetcher(url)
|
||||
|
||||
types = {
|
||||
'http': QNetworkProxy.HttpProxy,
|
||||
|
@ -765,7 +765,7 @@ class TestProxyFromUrl:
|
||||
@pytest.mark.parametrize('scheme', ['pac+http', 'pac+https'])
|
||||
def test_proxy_from_url_pac(self, scheme):
|
||||
fetcher = urlutils.proxy_from_url(QUrl('{}://foo'.format(scheme)))
|
||||
assert fetcher is pac.PACFetcher
|
||||
assert isinstance(fetcher, pac.PACFetcher)
|
||||
|
||||
@pytest.mark.parametrize('url, exception', [
|
||||
('blah', urlutils.InvalidProxyTypeError),
|
||||
|
Loading…
Reference in New Issue
Block a user