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:
Ian Stapleton Cordasco
2024-05-12 16:33:47 -05:00
committed by GitHub

View File

@@ -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})