Skip to content

Commit

Permalink
Use an invalid URI that will not cause httpbin to throw 500
Browse files Browse the repository at this point in the history
  • Loading branch information
franekmagiera committed May 12, 2024
1 parent 2d5f547 commit bf24b7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2721,7 +2721,7 @@ def test_preparing_bad_url(self, url):
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})
Expand Down

0 comments on commit bf24b7d

Please sign in to comment.