diff --git a/0001-Fix-test_417_openssl.py-if-pyOpenSSL-not-available.patch b/0001-Fix-test_417_openssl.py-if-pyOpenSSL-not-available.patch new file mode 100644 index 0000000..a439cdf --- /dev/null +++ b/0001-Fix-test_417_openssl.py-if-pyOpenSSL-not-available.patch @@ -0,0 +1,26 @@ +From 37478cf707c19ea4653c62ba3d101c3887c2ca83 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Fri, 22 Mar 2024 08:27:10 +0100 +Subject: [PATCH] Fix test_417_openssl.py if pyOpenSSL not available + +Only one of the test had the necessary @skipIf. +--- + tests/bugfixes/nosetests/test_417_openssl.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/bugfixes/nosetests/test_417_openssl.py b/tests/bugfixes/nosetests/test_417_openssl.py +index 750a3fc..3c2bc6b 100644 +--- a/tests/bugfixes/nosetests/test_417_openssl.py ++++ b/tests/bugfixes/nosetests/test_417_openssl.py +@@ -24,6 +24,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(): + "#417 urllib3.contrib.pyopenssl enable -> disable extract" + expect(urllib3.util.IS_PYOPENSSL).to.be.false +-- +2.43.0 + diff --git a/python-httpretty.changes b/python-httpretty.changes index 1f53f46..3aee024 100644 --- a/python-httpretty.changes +++ b/python-httpretty.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 22 07:33:35 UTC 2024 - Fabian Vogt + +- Add patch 0001-Fix-test_417_openssl.py-if-pyOpenSSL-not-available.patch: + * Fix tests without pyOpenSSL support in urllib3 + ------------------------------------------------------------------- Thu Mar 7 13:24:32 UTC 2024 - John Paul Adrian Glaubitz diff --git a/python-httpretty.spec b/python-httpretty.spec index 377f02d..04d75e9 100644 --- a/python-httpretty.spec +++ b/python-httpretty.spec @@ -40,6 +40,8 @@ Patch2: double-slash-paths.patch Patch3: 460-miliseconds_tests.patch # PATCH-FIX-OPENSUSE Relax the time for one test case from 2ms to 3ms. Patch4: relax-test-callback-response.patch +# PATCH-FIX-UPSTREAM https://github.com/gabrielfalcao/HTTPretty/pull/480 +Patch5: 0001-Fix-test_417_openssl.py-if-pyOpenSSL-not-available.patch %if %{with boto3} BuildRequires: %{python_module boto3} %endif