From f3fd444b0bc18e95d08c88567d9d8ed17346027d 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/urlparser_data/python/simpleapp.py | 3 +-- tests/urlparser_data/python/stream.py | 6 +++--- tests/urlparser_data/python/sub/simpleapp.py | 4 +--- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'tests/urlparser_data/python') diff --git a/tests/urlparser_data/python/simpleapp.py b/tests/urlparser_data/python/simpleapp.py index e13bb3e..7a36ce9 100644 --- a/tests/urlparser_data/python/simpleapp.py +++ b/tests/urlparser_data/python/simpleapp.py @@ -1,6 +1,5 @@ def application(environ, start_response): start_response('200 OK', [('Content-type', 'text/html'), ('test-header', 'TEST!')]) - return ['test1'] - + return [b'test1'] diff --git a/tests/urlparser_data/python/stream.py b/tests/urlparser_data/python/stream.py index 121b4d1..e81fd1c 100644 --- a/tests/urlparser_data/python/stream.py +++ b/tests/urlparser_data/python/stream.py @@ -1,7 +1,7 @@ def stream(): def app(environ, start_response): writer = start_response('200 OK', [('Content-type', 'text/html')]) - writer('te') - writer('st') - return ['2'] + writer(b'te') + writer(b'st') + return [b'2'] return app diff --git a/tests/urlparser_data/python/sub/simpleapp.py b/tests/urlparser_data/python/sub/simpleapp.py index ac83a56..88bd975 100644 --- a/tests/urlparser_data/python/sub/simpleapp.py +++ b/tests/urlparser_data/python/sub/simpleapp.py @@ -1,6 +1,4 @@ def application(environ, start_response): start_response('200 OK', [('Content-type', 'text/html'), ('test-header', 'TEST!')]) - return ['subsimple'] - - + return [b'subsimple'] -- cgit v1.2.1