diff options
Diffstat (limited to 'tests/test_requests.py')
| -rw-r--r-- | tests/test_requests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_requests.py b/tests/test_requests.py index 66043798..b4ee9f94 100644 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -2427,6 +2427,16 @@ class TestPreparingURLs(object): r.prepare() @pytest.mark.parametrize( + 'url, exception', + ( + ('http://localhost:-1', InvalidURL), + ) + ) + def test_redirecting_to_bad_url(self, httpbin, url, exception): + with pytest.raises(exception): + r = requests.get(httpbin('redirect-to'), params={'url': url}) + + @pytest.mark.parametrize( 'input, expected', ( ( |
