diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-02-15 11:35:44 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-02-15 11:35:44 +0100 |
commit | 5bfd17750b65ff200b0d963c0dee50cb2618b942 (patch) | |
tree | d4b146c4721ef69a9193c832d66013f086720922 /dev-python/httpbin | |
parent | dev-python/virtualenvwrapper: Remove old (diff) | |
download | gentoo-5bfd17750b65ff200b0d963c0dee50cb2618b942.tar.gz gentoo-5bfd17750b65ff200b0d963c0dee50cb2618b942.tar.bz2 gentoo-5bfd17750b65ff200b0d963c0dee50cb2618b942.zip |
dev-python/httpbin: Update no-flasgger patch for better compat
Update the no-flasgger patch not to create a redirect, as that causes
test failures in dev-python/httpcore.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/httpbin')
-rw-r--r-- | dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch | 24 | ||||
-rw-r--r-- | dev-python/httpbin/httpbin-0.10.1-r5.ebuild (renamed from dev-python/httpbin/httpbin-0.10.1-r4.ebuild) | 0 |
2 files changed, 1 insertions, 23 deletions
diff --git a/dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch b/dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch index c3d87ec4144d..d4695173dad5 100644 --- a/dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch +++ b/dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch @@ -54,34 +54,12 @@ index a82c1b8..77576a4 100644 + @app.route("/") + def no_flasgger_index(): + """Redirect to legacy index if flasgger is not available.""" -+ return redirect(url_for("view_landing_page")) ++ return view_landing_page() + + @app.route("/legacy") def view_landing_page(): """Generates Landing Page in legacy layout.""" -diff --git a/tests/test_httpbin.py b/tests/test_httpbin.py -index 6b75124..2ce63a6 100755 ---- a/tests/test_httpbin.py -+++ b/tests/test_httpbin.py -@@ -10,6 +10,7 @@ from hashlib import md5, sha256, sha512 - from io import BytesIO - - import httpbin -+from httpbin.core import Swagger - from httpbin.helpers import parse_multi_value_header - - -@@ -115,7 +116,8 @@ class HttpbinTestCase(unittest.TestCase): - - def test_index(self): - response = self.app.get('/', headers={'User-Agent': 'test'}) -- self.assertEqual(response.status_code, 200) -+ self.assertEqual(response.status_code, -+ 200 if Swagger is not None else 302) - - def get_data(self, response): - if 'get_data' in dir(response): -- 2.43.0 diff --git a/dev-python/httpbin/httpbin-0.10.1-r4.ebuild b/dev-python/httpbin/httpbin-0.10.1-r5.ebuild index d34c543e7976..d34c543e7976 100644 --- a/dev-python/httpbin/httpbin-0.10.1-r4.ebuild +++ b/dev-python/httpbin/httpbin-0.10.1-r5.ebuild |