Skip to content
Myr

Fix Python 3.x tests for TooManyRedirects API

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ryan Munro · committed by Ryan Munro · parent e6f218f · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:test_requests.py+2 added-2 removed
189 unmodified lines
190191 def test_HTTP_302_TOO_MANY_REDIRECTS(self, httpbin):192 try:193 requests.get(httpbin('redirect', '50'))194 except TooManyRedirects, e:194 except TooManyRedirects as e:195 assert e.request is not None196 assert len(e.response.history) == DEFAULT_REDIRECT_LIMIT197 else:198 assert False
2 unmodified lines
201 s = requests.session()202 s.max_redirects = 5203 try:204 s.get(httpbin('redirect', '50'))205 except TooManyRedirects, e:205 except TooManyRedirects as e:206 assert e.request is not None207 assert len(e.response.history) == 5208 else:209 assert False
1557 unmodified lines