Skip to content
Myr

Merge pull request #6700 from franekmagiera/update-redirect-to-invalid-uri-test

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

Use an invalid URI that will not cause httpbin to throw 500

authored by Ian Stapleton Cordasco · committed by GitHub · parents 2d5f547, bf24b7d · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • tests:+1 added−1 removed

1 file+1 added−1 removed

modified:tests/test_requests.py+1 added-1 removed
2719 unmodified lines
2720 r = requests.Request("GET", url=url)2721 with pytest.raises(requests.exceptions.InvalidURL):2722 r.prepare()27232724 @pytest.mark.parametrize("url, exception", (("http://localhost:-1", InvalidURL),))2724 @pytest.mark.parametrize("url, exception", (("http://:1", InvalidURL),))2725 def test_redirecting_to_bad_url(self, httpbin, url, exception):2726 with pytest.raises(exception):2727 requests.get(httpbin("redirect-to"), params={"url": url})2728
248 unmodified lines