Merge pull request #6700 from franekmagiera/update-redirect-to-invalid-uri-test
Use an invalid URI that will not cause httpbin to throw 500
This commit is contained in:
@@ -2721,7 +2721,7 @@ class TestPreparingURLs:
|
||||
with pytest.raises(requests.exceptions.InvalidURL):
|
||||
r.prepare()
|
||||
|
||||
@pytest.mark.parametrize("url, exception", (("http://localhost:-1", InvalidURL),))
|
||||
@pytest.mark.parametrize("url, exception", (("http://:1", InvalidURL),))
|
||||
def test_redirecting_to_bad_url(self, httpbin, url, exception):
|
||||
with pytest.raises(exception):
|
||||
requests.get(httpbin("redirect-to"), params={"url": url})
|
||||
|
||||
Reference in New Issue
Block a user