From 80aee7a2252f15d6790f15e1d98d59885e9c7e7b Mon Sep 17 00:00:00 2001 From: Colin Dickson Date: Wed, 4 Feb 2015 21:05:03 -0500 Subject: [PATCH] add a timeout value to connection_error_invalid_port test to accelerate failure --- test_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_requests.py b/test_requests.py index 3f496fc8..6e527848 100755 --- a/test_requests.py +++ b/test_requests.py @@ -309,7 +309,7 @@ class RequestsTestCase(unittest.TestCase): def test_connection_error_invalid_port(self): """Connecting to an invalid port should raise a ConnectionError""" with pytest.raises(ConnectionError): - requests.get("http://httpbin.org:1") + requests.get("http://httpbin.org:1", timeout=1) def test_LocationParseError(self): """Inputing a URL that cannot be parsed should raise an InvalidURL error"""