diff --git a/add-support-for-Misdirected-Request.patch b/add-support-for-Misdirected-Request.patch new file mode 100644 index 0000000000000000000000000000000000000000..3cfaed87f913e41e6552e1515767dde55dc2d9cf --- /dev/null +++ b/add-support-for-Misdirected-Request.patch @@ -0,0 +1,37 @@ +From 20c02cdb77bd6c9827625a68c1a1af339c50b819 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lu=C3=ADs=20Soares?= +Date: Thu, 8 Sep 2022 10:12:46 +0100 +Subject: [PATCH] add support for 421: "Misdirected Request" + +--- + httpretty/http.py | 1 + + tests/unit/test_httpretty.py | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/httpretty/http.py b/httpretty/http.py +index 87ceca9..0f75935 100644 +--- a/httpretty/http.py ++++ b/httpretty/http.py +@@ -73,6 +73,7 @@ STATUSES = { + 417: "Expectation Failed", + 418: "I'm a teapot", + 420: "Enhance Your Calm", ++ 421: "Misdirected Request", + 422: "Unprocessable Entity", + 423: "Locked", + 424: "Failed Dependency", +diff --git a/tests/unit/test_httpretty.py b/tests/unit/test_httpretty.py +index 017b290..89b2abf 100644 +--- a/tests/unit/test_httpretty.py ++++ b/tests/unit/test_httpretty.py +@@ -117,6 +117,7 @@ def test_status_codes(): + 417: "Expectation Failed", + 418: "I'm a teapot", + 420: "Enhance Your Calm", ++ 421: "Misdirected Request", + 422: "Unprocessable Entity", + 423: "Locked", + 424: "Failed Dependency", +-- +2.39.0.windows.2 + diff --git a/python-httpretty.spec b/python-httpretty.spec index a238360efd86382a795eaf3f4ef06bf38faf03e3..3b9b6c2f5a6d18e0f3326a2c94a83e1b583f862d 100644 --- a/python-httpretty.spec +++ b/python-httpretty.spec @@ -1,6 +1,6 @@ Name: python-httpretty Version: 1.1.4 -Release: 2 +Release: 3 Summary: HTTP Client mocking tool for Python License: MIT URL: https://pypi.org/project/httpretty/ @@ -8,6 +8,7 @@ Source0: https://files.pythonhosted.org/packages/source/h/httpretty/httpr # https://github.com/gabrielfalcao/HTTPretty/issues/457 Patch0: test_handle_slashes.patch Patch0001: Duplicate-requests-in-latest_requests-if-there-are-chunks.patch +Patch0002: add-support-for-Misdirected-Request.patch BuildArch: noarch @@ -49,6 +50,9 @@ LANG=en_US.UTF-8 %{__python3} -m nose2 -v %{python3_sitelib}/httpretty-%{version}-py%{python3_version}.egg-info %changelog +* Mon Jan 9 2023 zhangliangpengkun - 1.1.4-3 +- add support for Misdirected Request + * Sat Jan 7 2023 zhangliangpengkun - 1.1.4-2 - Fix Duplicate requests in latest_requests if there are chunks