add a timeout value to connection_error_invalid_port test to accelerate failure
authorColin Dickson <colin.dickson@gmail.com>
Thu, 5 Feb 2015 02:05:03 +0000 (21:05 -0500)
committerColin Dickson <colin.dickson@gmail.com>
Thu, 5 Feb 2015 02:05:03 +0000 (21:05 -0500)
test_requests.py

index 3f496fc872f93c6b2c18418e7e05bfa03464fbc3..6e527848b44e5d2e4537655c16dc169798aa44c5 100755 (executable)
@@ -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"""