From 843689f8081b933a24a75d7a9e45a55eeac988c9ec60b469e01b157f54dfb669 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 8 Aug 2022 02:55:49 +0000 Subject: [PATCH] - Add patch double-slash-paths.patch: * http.request may replace // with /, handle that in the testcase. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpretty?expand=0&rev=49 --- double-slash-paths.patch | 10 ++++++++++ python-httpretty.changes | 6 ++++++ python-httpretty.spec | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 double-slash-paths.patch diff --git a/double-slash-paths.patch b/double-slash-paths.patch new file mode 100644 index 0000000..42cf8a2 --- /dev/null +++ b/double-slash-paths.patch @@ -0,0 +1,10 @@ +Index: httpretty-1.1.4/tests/functional/test_requests.py +=================================================================== +--- httpretty-1.1.4.orig/tests/functional/test_requests.py ++++ httpretty-1.1.4/tests/functional/test_requests.py +@@ -946,4 +946,4 @@ def test_httpretty_should_handle_paths_s + response = requests.get('http://example.com//foo') + expect(response.text).to.equal('Find the best foo') + expect(HTTPretty.last_request.method).to.equal('GET') +- expect(HTTPretty.last_request.path).to.equal('//foo') ++ expect(HTTPretty.last_request.path).to.be.within(['//foo', '/foo']) diff --git a/python-httpretty.changes b/python-httpretty.changes index 3e6689a..993f4f5 100644 --- a/python-httpretty.changes +++ b/python-httpretty.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 8 02:53:55 UTC 2022 - Steve Kowalik + +- Add patch double-slash-paths.patch: + * http.request may replace // with /, handle that in the testcase. + ------------------------------------------------------------------- Sat Aug 6 17:32:34 UTC 2022 - Matej Cepl diff --git a/python-httpretty.spec b/python-httpretty.spec index 5fc1e63..c5e6eae 100644 --- a/python-httpretty.spec +++ b/python-httpretty.spec @@ -29,6 +29,9 @@ Patch0: remove-mock.patch # PATCH-FIX-UPSTREAM 453-fix-tests-pytest.patch gh#gabrielfalcao/HTTPretty#449 mcepl@suse.com # Make tests compatible with pytest Patch1: 453-fix-tests-pytest.patch +# PATCH-FIX-OPENSUSE test_double_slash may be replaced with / from stdlib +# gh#gabrielfalcao/HTTPretty#457 +Patch2: double-slash-paths.patch BuildRequires: %{python_module boto3} BuildRequires: %{python_module eventlet} BuildRequires: %{python_module fakeredis}