summaryrefslogtreecommitdiff
path: root/tests/urlparser_data/python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-21 15:57:20 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-04-21 15:57:20 +0200
commitf3fd444b0bc18e95d08c88567d9d8ed17346027d (patch)
treea92c992c3c6e428191c6687bafe618ef060ac9ca /tests/urlparser_data/python
parent75646c0540381741943935a15c23ab1a226043c2 (diff)
downloadpaste-f3fd444b0bc18e95d08c88567d9d8ed17346027d.tar.gz
Fix urlparser tests on Python 3
HTTP body must be bytes
Diffstat (limited to 'tests/urlparser_data/python')
-rw-r--r--tests/urlparser_data/python/simpleapp.py3
-rw-r--r--tests/urlparser_data/python/stream.py6
-rw-r--r--tests/urlparser_data/python/sub/simpleapp.py4
3 files changed, 5 insertions, 8 deletions
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']