From bf24b7d8d17da34be720c19e5978b2d3bf94a53b Mon Sep 17 00:00:00 2001 From: franekmagiera Date: Sun, 12 May 2024 22:08:24 +0200 Subject: [PATCH] Use an invalid URI that will not cause httpbin to throw 500 --- tests/test_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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})