diff options
Diffstat (limited to 'tests/urlparser_data/hook')
| -rw-r--r-- | tests/urlparser_data/hook/app.py | 8 | ||||
| -rw-r--r-- | tests/urlparser_data/hook/index.py | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/tests/urlparser_data/hook/app.py b/tests/urlparser_data/hook/app.py index d2714e5..1a98013 100644 --- a/tests/urlparser_data/hook/app.py +++ b/tests/urlparser_data/hook/app.py @@ -1,5 +1,9 @@ +import six + def application(environ, start_response): start_response('200 OK', [('Content-type', 'text/html')]) - return ['user: %s' % environ['app.user']] + body = 'user: %s' % environ['app.user'] + if six.PY3: + body = body.encode('ascii') + return [body] - diff --git a/tests/urlparser_data/hook/index.py b/tests/urlparser_data/hook/index.py index 49e89f0..92f3d66 100644 --- a/tests/urlparser_data/hook/index.py +++ b/tests/urlparser_data/hook/index.py @@ -1,4 +1,9 @@ +import six + def application(environ, start_response): start_response('200 OK', [('Content-type', 'text/html')]) - return ['index: %s' % environ['app.user']] + body = 'index: %s' % environ['app.user'] + if six.PY3: + body = body.encode('ascii') + return [body] |
