Add test for invalid port
authorIan Cordasco <ian.cordasco@rackspace.com>
Fri, 29 Aug 2014 21:50:45 +0000 (16:50 -0500)
committerIan Cordasco <ian.cordasco@rackspace.com>
Fri, 29 Aug 2014 21:50:45 +0000 (16:50 -0500)
test_requests.py

index 3868f9dc1f7da132c59d08e4aad1a81164443d64..2ff61248b5fd6f1009a08f53b63699dbd575b9df 100755 (executable)
@@ -291,6 +291,9 @@ class RequestsTestCase(unittest.TestCase):
         with pytest.raises(ConnectionError):
             requests.get("http://fooobarbangbazbing.httpbin.org")
 
+        with pytest.raises(ConnectionError):
+            requests.get("http://httpbin.org:1")
+
     def test_basicauth_with_netrc(self):
         auth = ('user', 'pass')
         wrong_auth = ('wronguser', 'wrongpass')