diff --git a/tests/test_requests.py b/tests/test_requests.py index d05febeef5..b4e9fe92ae 100644 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -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})