Fix Python 3.x tests for TooManyRedirects API

This commit is contained in:
Ryan Munro
2016-01-19 16:59:18 -08:00
parent e6f218f3f6
commit 5a18066c45
+2 -2
View File
@@ -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: