summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:47:35 +0100
committerCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:47:35 +0100
commitfbd07d8a7cf88daf5d821601578d2f7bc1c92928 (patch)
tree85154672d76bd72b10b6277a5189e1b6587ae11a /tests
parent674ae7718bc06a8b8c8b658075bf82c8198fb632 (diff)
downloadpaste-fbd07d8a7cf88daf5d821601578d2f7bc1c92928.tar.gz
Python 3: Replace "except Exception, exc" with "except Exception as exc:"
Diffstat (limited to 'tests')
-rw-r--r--tests/test_auth/test_auth_digest.py2
-rw-r--r--tests/test_recursive.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_auth/test_auth_digest.py b/tests/test_auth/test_auth_digest.py
index 55f953d..a821720 100644
--- a/tests/test_auth/test_auth_digest.py
+++ b/tests/test_auth/test_auth_digest.py
@@ -82,7 +82,7 @@ if os.environ.get("TEST_SOCKET",""):
try:
authfetch('bing','wrong')
assert False, "this should raise an exception"
- except urllib2.HTTPError, e:
+ except HTTPError as e:
assert e.code == 401
def test_shutdown():
diff --git a/tests/test_recursive.py b/tests/test_recursive.py
index e79d586..34f2f66 100644
--- a/tests/test_recursive.py
+++ b/tests/test_recursive.py
@@ -37,7 +37,7 @@ def forward(app):
assert 'Page not found' in res
try:
res = app.get('/recurse')
- except AssertionError, e:
+ except AssertionError as e:
if str(e).startswith('Forwarding loop detected'):
pass
else:
@@ -89,7 +89,7 @@ def test_ForwardRequest_factory():
assert 'Page not found' in res
try:
res = app.get('/recurse')
- except AssertionError, e:
+ except AssertionError as e:
if str(e).startswith('Forwarding loop detected'):
pass
else: