From 8bd799e33c874f88091b3a16b5307ead22f1ee3a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 21 Apr 2015 15:57:20 +0200 Subject: Fix urlparser tests on Python 3 HTTP body must be bytes --- tests/test_urlparser.py | 12 ++++++------ tests/urlparser_data/hook/app.py | 8 ++++++-- tests/urlparser_data/hook/index.py | 7 ++++++- tests/urlparser_data/not_found/simple/__init__.py | 2 +- tests/urlparser_data/not_found/user/list.py | 7 ++++++- tests/urlparser_data/python/simpleapp.py | 3 +-- tests/urlparser_data/python/stream.py | 6 +++--- tests/urlparser_data/python/sub/simpleapp.py | 4 +--- 8 files changed, 30 insertions(+), 19 deletions(-) diff --git a/tests/test_urlparser.py b/tests/test_urlparser.py index d1f3377..21c210e 100644 --- a/tests/test_urlparser.py +++ b/tests/test_urlparser.py @@ -110,7 +110,7 @@ def test_xss(): app = TestApp(StaticURLParser(relative_path('find_file')), extra_environ={'HTTP_ACCEPT': 'text/html'}) res = app.get("/-->%0D", status=404) - assert '-->