mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
add a timeout value to connection_error_invalid_port test to accelerate failure
This commit is contained in:
+1
-1
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user