Skip to content

Commit

Permalink
Allow newer WebTest versions. (#32)
Browse files Browse the repository at this point in the history
* Allow newer WebTest versions.

2.0.28 fixed the regressions we saw with 2.0.27.
A big thank you goes to @fschulze for doing bringing up the fix there.
  • Loading branch information
Michael Howitz committed Sep 1, 2017
1 parent 8e3c130 commit e770f7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ CHANGES
5.3 (unreleased)
----------------

- Pin to `WebTest < 2.0.27` as newer versions break some tests.
- Exclude version 2.0.27 of `WebTest` from allowed versions as it breaks some
tests.


5.2 (2017-02-25)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
'zope.schema',
'zope.cachedescriptors',
'pytz > dev',
'WebTest >= 2.0.9, < 2.0.27',
'WebTest >= 2.0.9, != 2.0.27',
'WSGIProxy2',
'six',
],
Expand Down
4 changes: 4 additions & 0 deletions src/zope/testbrowser/ftests/wsgitestapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ def set_header(req):
resp = Response()
body = [u"Set Headers:"]
for k, v in sorted(req.params.items()):
if not isinstance(k, str):
k = k.encode('latin1')
if not isinstance(v, str):
v = v.encode('latin1')
body.extend([k, v])
resp.headers.add(k, v)
resp.unicode_body = u'\n'.join(body)
Expand Down

0 comments on commit e770f7c

Please sign in to comment.