Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7afb2ed

Browse files
committedAug 1, 2023
Fix test compatibility with werkzeug 0.15.x
Remove the check for `Content-Length` header that is not provided by default anymore with werkzeug 0.15.x. See: pallets/werkzeug#2347 Taken from postmanlabs#684
1 parent f67bf70 commit 7afb2ed

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed
 

‎setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
include_package_data = True, # include files listed in MANIFEST.in
3737
install_requires=[
3838
'Flask<1.1', 'MarkupSafe<2.1', 'decorator', 'itsdangerous<2.1', 'brotlipy',
39-
'raven[flask]', 'werkzeug<0.15', 'gevent', 'flasgger', 'jinja2<3.1'
39+
'raven[flask]', 'werkzeug<2', 'gevent', 'flasgger', 'jinja2<3.1'
4040
],
4141
)

‎tests/test_httpbin.py

-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ def test_get(self):
147147
data = json.loads(response.data.decode('utf-8'))
148148
self.assertEqual(data['args'], {})
149149
self.assertEqual(data['headers']['Host'], 'localhost')
150-
self.assertEqual(data['headers']['Content-Length'], '0')
151150
self.assertEqual(data['headers']['User-Agent'], 'test')
152151
# self.assertEqual(data['origin'], None)
153152
self.assertEqual(data['url'], 'http://localhost/get')
@@ -161,7 +160,6 @@ def test_anything(self):
161160
data = json.loads(response.data.decode('utf-8'))
162161
self.assertEqual(data['args'], {})
163162
self.assertEqual(data['headers']['Host'], 'localhost')
164-
self.assertEqual(data['headers']['Content-Length'], '0')
165163
self.assertEqual(data['url'], 'http://localhost/anything/foo/bar')
166164
self.assertEqual(data['method'], 'GET')
167165
self.assertTrue(response.data.endswith(b'\n'))

0 commit comments

Comments
 (0)
Please sign in to comment.