Support requests>=2.14.0

From that release onwards, `cert_verify` raises `IOError` [1].

    1: https://github.com/kennethreitz/requests/commit/7d8b87c
This commit is contained in:
Pablo Santiago Blum de Aguiar 2017-05-17 13:51:43 -03:00
parent f1d4861fae
commit 9776a6dea0

View File

@ -90,7 +90,8 @@ class TestServerCert:
http(httpbin_secure_untrusted.url + '/get')
def test_verify_custom_ca_bundle_invalid_path(self, httpbin_secure):
with pytest.raises(SSLError):
# since 2.14.0 requests raises IOError
with pytest.raises((SSLError, IOError)):
http(httpbin_secure.url + '/get', '--verify', '/__not_found__')
def test_verify_custom_ca_bundle_invalid_bundle(self, httpbin_secure):