From: Ian Cordasco Date: Fri, 29 Aug 2014 21:50:45 +0000 (-0500) Subject: Add test for invalid port X-Git-Tag: v2.4.1~5^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce7957c085d912bd1b225460d159b19eaf3e6510;p=services%2Fpython-requests.git Add test for invalid port --- diff --git a/test_requests.py b/test_requests.py index 3868f9d..2ff6124 100755 --- a/test_requests.py +++ b/test_requests.py @@ -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')