Skip to content
Myr

Add exception message to TooManyRedirects test

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 6a8a480 · 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
194 unmodified lines
195 assert '/relative-redirect/20' in e.request.url196 assert e.request.url == e.response.url197 assert len(e.response.history) == 30198 else:199 pytest.fail()199 pytest.fail('Expected redirect to raise TooManyRedirects but it did not')200201 def test_HTTP_302_TOO_MANY_REDIRECTS_WITH_PARAMS(self, httpbin):202 s = requests.session()203 s.max_redirects = 5
3 unmodified lines
207 assert '/relative-redirect/45' in e.request.url208 assert e.request.url == e.response.url209 assert len(e.response.history) == 5210 else:211 pytest.fail()211 pytest.fail('Expected redirect to raise TooManyRedirects but it did not')212213 # def test_HTTP_302_ALLOW_REDIRECT_POST(self):214 # r = requests.post(httpbin('status', '302'), data={'some': 'data'})215 # self.assertEqual(r.status_code, 200)
1553 unmodified lines