1
0

Accepting request 1160596 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1160596
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-httpretty?expand=0&rev=28
This commit is contained in:
Ana Guerrero 2024-05-17 18:04:04 +00:00 committed by Git OBS Bridge
commit 8e7bd5f7db
3 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From 37478cf707c19ea4653c62ba3d101c3887c2ca83 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 22 07:33:35 UTC 2024 - Fabian Vogt <fvogt@suse.com>
- 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 <adrian.glaubitz@suse.com>

View File

@ -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