From 5a18066c451ce6d5cd8a4b3dbcb229d7e3af2492 Mon Sep 17 00:00:00 2001 From: Ryan Munro Date: Tue, 19 Jan 2016 16:59:18 -0800 Subject: [PATCH] Fix Python 3.x tests for TooManyRedirects API --- test_requests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_requests.py b/test_requests.py index 80602294..95ccdaca 100755 --- a/test_requests.py +++ b/test_requests.py @@ -191,7 +191,7 @@ class TestRequests(object): def test_HTTP_302_TOO_MANY_REDIRECTS(self, httpbin): try: requests.get(httpbin('redirect', '50')) - except TooManyRedirects, e: + except TooManyRedirects as e: assert e.request is not None assert len(e.response.history) == DEFAULT_REDIRECT_LIMIT else: @@ -202,7 +202,7 @@ class TestRequests(object): s.max_redirects = 5 try: s.get(httpbin('redirect', '50')) - except TooManyRedirects, e: + except TooManyRedirects as e: assert e.request is not None assert len(e.response.history) == 5 else: