!18 add support for Misdirected Request
From: @zhang-liang-pengkun Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
154cc001f9
37
add-support-for-Misdirected-Request.patch
Normal file
37
add-support-for-Misdirected-Request.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 20c02cdb77bd6c9827625a68c1a1af339c50b819 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Lu=C3=ADs=20Soares?= <lsoares@gmail.com>
|
||||
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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: python-httpretty
|
||||
Version: 1.1.4
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: HTTP Client mocking tool for Python
|
||||
License: MIT
|
||||
URL: https://pypi.org/project/httpretty/
|
||||
@ -10,6 +10,7 @@ BuildArch: noarch
|
||||
|
||||
Patch0000: test_handle_slashes.patch
|
||||
Patch0001: Duplicate-requests-in-latest_requests-if-there-are-chunks.patch
|
||||
Patch0002: add-support-for-Misdirected-Request.patch
|
||||
|
||||
%description
|
||||
HTTP Client mocking tool for Python.Provides a full fake TCP socket module.
|
||||
@ -50,6 +51,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<zhangliangpengkun@xfusion.com> - 1.1.4-5
|
||||
- add support for Misdirected Request
|
||||
|
||||
* Sat Jan 7 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 1.1.4-4
|
||||
- Fix Duplicate requests in latest_requests if there are chunks
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user