diff --git a/0002-fix-query-param-matching.patch b/0002-fix-query-param-matching.patch new file mode 100644 index 0000000000000000000000000000000000000000..3b0f13b403c35d96c926d1e5659224ceaaa981b3 --- /dev/null +++ b/0002-fix-query-param-matching.patch @@ -0,0 +1,26 @@ +From 946b0613ac40d26713031053028a16da1f6c26f0 Mon Sep 17 00:00:00 2001 +From: Dave Trollope +Date: Fri, 7 Sep 2018 14:35:10 -0500 +Subject: [PATCH] fix query param matching + +--- + httpretty/core.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/httpretty/core.py b/httpretty/core.py +index 92dd8a9..8da3428 100644 +--- a/httpretty/core.py ++++ b/httpretty/core.py +@@ -991,7 +991,8 @@ class URIMatcher(object): + + def matches(self, info): + if self.info: +- return self.info == info ++ # Query string is not considered when comparing info objects, compare separately ++ return self.info == info and (not self._match_querystring or self.info.query == info.query) + else: + return self.regex.search(info.full_url( + use_querystring=self._match_querystring)) +-- +2.39.0.windows.2 + diff --git a/python-httpretty.spec b/python-httpretty.spec index 5be5228a8896dccdac0ea5415eb399c31771dfab..ec9adfa9f60a97b242f13d97235c7c843c2a8a14 100644 --- a/python-httpretty.spec +++ b/python-httpretty.spec @@ -1,6 +1,6 @@ Name: python-httpretty Version: 0.9.5 -Release: 5 +Release: 6 Summary: HTTP Client mocking tool for Python License: MIT URL: https://pypi.org/project/httpretty/ @@ -10,6 +10,7 @@ Patch0001: python-httpretty-fakesock_getpeercert_noconnect.patch Patch0002: 0001-Handle-bugs-in-older-urllib3-versions-in-one-of-the-.patch Patch0003: 0001-Call-reset-from-setUp-and-tearDown-in-addition-to-en.patch Patch0004: Mock-time-to-make-date-based-tests-reliable.patch +Patch0005: 0002-fix-query-param-matching.patch BuildRequires: python2-devel python2-setuptools python2-httplib2 python2-mock python2-nose BuildRequires: python2-requests python2-sure python2-urllib3 python2-tornado python-unittest2 @@ -69,6 +70,9 @@ LANG=en_US.UTF-8 %{__python3} -m nose2 -v %{python3_sitelib}/httpretty-%{version}-py3.?.egg-info %changelog +* Thu Nov 16 2023 zhangliangpengkun - 0.9.5-6 +- fix query param matching + * Fri Dec 30 2022 yaoxin - 0.9.5-5 - Fix occasional failures in check stage