From 9776a6dea0308e05c23db05b542920ebd6bea6c4 Mon Sep 17 00:00:00 2001 From: Pablo Santiago Blum de Aguiar Date: Wed, 17 May 2017 13:51:43 -0300 Subject: [PATCH] Support requests>=2.14.0 From that release onwards, `cert_verify` raises `IOError` [1]. 1: https://github.com/kennethreitz/requests/commit/7d8b87c --- tests/test_ssl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_ssl.py b/tests/test_ssl.py index 50f34d4c..63bfd117 100644 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -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):