From 5878dde4211c97392d89db221bf3ff59b6c18274 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 20 May 2021 08:59:47 +0800 Subject: [PATCH] Skip the second test in test_417_openssl.py too if extract_from_urllib3 is not present Otherwise the tests will fail because extract_from_urllib3 is None and cannot be called. --- tests/functional/bugfixes/test_417_openssl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/bugfixes/test_417_openssl.py b/tests/functional/bugfixes/test_417_openssl.py index 29d82da5..e3d7fcda 100644 --- a/tests/functional/bugfixes/test_417_openssl.py +++ b/tests/functional/bugfixes/test_417_openssl.py @@ -23,6 +23,8 @@ def test_enable_disable_httpretty_extract(): extract_from_urllib3() expect(urllib3.util.IS_PYOPENSSL).to.be.false +@skipIf(extract_from_urllib3 is None, + "urllib3.contrib.pyopenssl.extract_from_urllib3 does not exist") def test_enable_disable_httpretty(): expect(urllib3.util.IS_PYOPENSSL).to.be.false httpretty.enable()