summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-22 00:04:53 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-04-22 00:04:53 +0200
commitd634e965d9de2efe87888c8afad5b82cbca97bdf (patch)
tree3963425d7ae1c1e975d55305699474775cffa0ad /tests
parenta866d3fe38fc7c212abf90355ecffe51864ccf5b (diff)
downloadpaste-d634e965d9de2efe87888c8afad5b82cbca97bdf.tar.gz
Fix cgitb_catcher on Python 3
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cgitb_catcher.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_cgitb_catcher.py b/tests/test_cgitb_catcher.py
index c2c6632..a63f7d8 100644
--- a/tests/test_cgitb_catcher.py
+++ b/tests/test_cgitb_catcher.py
@@ -31,7 +31,7 @@ def after_start_response_app(environ, start_response):
def iter_app(environ, start_response):
start_response("200 OK", [('Content-type', 'text/plain')])
- return yielder(['this', ' is ', ' a', None])
+ return yielder([b'this', b' is ', b' a', None])
def yielder(args):
for arg in args:
@@ -46,7 +46,10 @@ def yielder(args):
def test_makes_exception():
res = do_request(bad_app)
print(res)
- assert 'bad_app() takes no arguments (2 given' in res
+ if six.PY3:
+ assert 'bad_app() takes 0 positional arguments but 2 were given' in res
+ else:
+ assert 'bad_app() takes no arguments (2 given' in res
assert 'iterator = application(environ, start_response_wrapper)' in res
assert 'lint.py' in res
assert 'cgitb_catcher.py' in res