diff --git a/test/test_interceptor.py b/test/test_interceptor.py index 66e0881..de0e9ca 100644 --- a/test/test_interceptor.py +++ b/test/test_interceptor.py @@ -211,8 +211,8 @@ def test_urllib3_in_out(): assert 'WSGI intercept successful!' in str(response.data) # outside the context manager the intercept does not work - with py.test.raises(urllib3.exceptions.MaxRetryError): - httppool.request('GET', url) + with py.test.raises(urllib3.exceptions.ProtocolError): + httppool.request('GET', url, retries=False) # urllib diff --git a/test/test_urllib3.py b/test/test_urllib3.py index 8206d5e..ccf1e40 100644 --- a/test/test_urllib3.py +++ b/test/test_urllib3.py @@ -38,8 +38,8 @@ def test_http_other_port(): def test_bogus_domain(): with InstalledApp(wsgi_app.simple_app, host=HOST, port=80): py.test.raises( - urllib3.exceptions.MaxRetryError, - 'http.request("GET", "http://_nonexistant_domain_")') + urllib3.exceptions.ProtocolError, + 'http.request("GET", "http://_nonexistant_domain_", retries=False)') def test_proxy_handling():