Accepting request 901426 from devel:languages:python

- Modify werkzeug.patch to support Werkzeug 2.0, update Requires.

OBS-URL: https://build.opensuse.org/request/show/901426
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-httpbin?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2021-07-10 20:53:46 +00:00 committed by Git OBS Bridge
commit 8c93633889
3 changed files with 56 additions and 9 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jun 23 08:30:27 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Modify werkzeug.patch to support Werkzeug 2.0, update Requires.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 28 11:12:45 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com> Tue May 28 11:12:45 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-httpbin # spec file for package python-httpbin
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -30,7 +30,7 @@ Patch0: werkzeug.patch
BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Brotli}
BuildRequires: %{python_module Flask} BuildRequires: %{python_module Flask}
BuildRequires: %{python_module MarkupSafe} BuildRequires: %{python_module MarkupSafe}
BuildRequires: %{python_module Werkzeug >= 0.14.1} BuildRequires: %{python_module Werkzeug >= 2.0}
BuildRequires: %{python_module blinker} BuildRequires: %{python_module blinker}
BuildRequires: %{python_module decorator} BuildRequires: %{python_module decorator}
BuildRequires: %{python_module flasgger} BuildRequires: %{python_module flasgger}
@ -44,7 +44,7 @@ BuildRequires: python-rpm-macros
Requires: python-Brotli Requires: python-Brotli
Requires: python-Flask Requires: python-Flask
Requires: python-MarkupSafe Requires: python-MarkupSafe
Requires: python-Werkzeug >= 0.14.1 Requires: python-Werkzeug >= 2.0
Requires: python-blinker Requires: python-blinker
Requires: python-decorator Requires: python-decorator
Requires: python-flasgger Requires: python-flasgger

View File

@ -12,11 +12,11 @@ Subject: [PATCH] fix #554: update tests, Pipfile, Pipfile.lock for
test_httpbin.py | 2 -- test_httpbin.py | 2 --
3 files changed, 4 insertions(+), 6 deletions(-) 3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/test_httpbin.py b/test_httpbin.py Index: python-httpbin-0.7.0+git20181107.f8ec666/test_httpbin.py
index b7104ffc..ea51ae81 100755 ===================================================================
--- a/test_httpbin.py --- python-httpbin-0.7.0+git20181107.f8ec666.orig/test_httpbin.py
+++ b/test_httpbin.py +++ python-httpbin-0.7.0+git20181107.f8ec666/test_httpbin.py
@@ -148,7 +148,6 @@ def test_get(self): @@ -148,7 +148,6 @@ class HttpbinTestCase(unittest.TestCase)
data = json.loads(response.data.decode('utf-8')) data = json.loads(response.data.decode('utf-8'))
self.assertEqual(data['args'], {}) self.assertEqual(data['args'], {})
self.assertEqual(data['headers']['Host'], 'localhost') self.assertEqual(data['headers']['Host'], 'localhost')
@ -24,7 +24,7 @@ index b7104ffc..ea51ae81 100755
self.assertEqual(data['headers']['User-Agent'], 'test') self.assertEqual(data['headers']['User-Agent'], 'test')
# self.assertEqual(data['origin'], None) # self.assertEqual(data['origin'], None)
self.assertEqual(data['url'], 'http://localhost/get') self.assertEqual(data['url'], 'http://localhost/get')
@@ -162,7 +161,6 @@ def test_anything(self): @@ -162,7 +161,6 @@ class HttpbinTestCase(unittest.TestCase)
data = json.loads(response.data.decode('utf-8')) data = json.loads(response.data.decode('utf-8'))
self.assertEqual(data['args'], {}) self.assertEqual(data['args'], {})
self.assertEqual(data['headers']['Host'], 'localhost') self.assertEqual(data['headers']['Host'], 'localhost')
@ -32,3 +32,45 @@ index b7104ffc..ea51ae81 100755
self.assertEqual(data['url'], 'http://localhost/anything/foo/bar') self.assertEqual(data['url'], 'http://localhost/anything/foo/bar')
self.assertEqual(data['method'], 'GET') self.assertEqual(data['method'], 'GET')
self.assertTrue(response.data.endswith(b'\n')) self.assertTrue(response.data.endswith(b'\n'))
@@ -586,7 +584,7 @@ class HttpbinTestCase(unittest.TestCase)
def test_redirect_n_higher_than_1(self):
response = self.app.get('/redirect/5')
self.assertEqual(
- response.headers.get('Location'), '/relative-redirect/4'
+ response.headers.get('Location'), 'http://localhost/relative-redirect/4'
)
def test_redirect_to_post(self):
@@ -595,7 +593,7 @@ class HttpbinTestCase(unittest.TestCase)
content_type='application/octet-stream')
self.assertEqual(response.status_code, 307)
self.assertEqual(
- response.headers.get('Location'), '/post'
+ response.headers.get('Location'), 'http://localhost/post'
)
def test_redirect_absolute_param_n_higher_than_1(self):
@@ -608,20 +606,20 @@ class HttpbinTestCase(unittest.TestCase)
response = self.app.get('/redirect/1')
self.assertEqual(response.status_code, 302)
self.assertEqual(
- response.headers.get('Location'), '/get'
+ response.headers.get('Location'), 'http://localhost/get'
)
def test_relative_redirect_n_equals_to_1(self):
response = self.app.get('/relative-redirect/1')
self.assertEqual(
- response.headers.get('Location'), '/get'
+ response.headers.get('Location'), 'http://localhost/get'
)
def test_relative_redirect_n_higher_than_1(self):
response = self.app.get('/relative-redirect/7')
self.assertEqual(response.status_code, 302)
self.assertEqual(
- response.headers.get('Location'), '/relative-redirect/6'
+ response.headers.get('Location'), 'http://localhost/relative-redirect/6'
)
def test_absolute_redirect_n_higher_than_1(self):