From 521253bae868ed23c51963029ddcbbe4692ee202 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 20 May 2021 08:59:47 +0800 Subject: [PATCH] Make extract_from_urllib3 a function when it's not present Otherwise test_enable_disable_httpretty() will fail because NoneType is not callable. --- tests/functional/bugfixes/test_417_openssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/bugfixes/test_417_openssl.py b/tests/functional/bugfixes/test_417_openssl.py index 29d82da5..fdfaf08f 100644 --- a/tests/functional/bugfixes/test_417_openssl.py +++ b/tests/functional/bugfixes/test_417_openssl.py @@ -11,7 +11,7 @@ try: from urllib3.contrib.pyopenssl import extract_from_urllib3 except Exception: - extract_from_urllib3 = None + extract_from_urllib3 = lambda x: x @skipIf(extract_from_urllib3 is None,