From da26f1f37729b614db68cef4c968e99009210a51 Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 20 May 2011 18:31:23 +0200 Subject: [PATCH] Adjust tests --- test_requests.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test_requests.py b/test_requests.py index 34c22bb..f58fee5 100755 --- a/test_requests.py +++ b/test_requests.py @@ -157,10 +157,8 @@ class RequestsTestSuite(unittest.TestCase): self.assertEquals(r.status_code, 401) def test_settings(self): - import urllib2 - - with requests.settings(timeout=0): - self.assertRaises(urllib2.URLError, requests.get, 'http://google.com') + with requests.settings(timeout=0.0001): + self.assertRaises(requests.Timeout, requests.get, 'http://google.com') with requests.settings(timeout=10): requests.get('http://google.com') -- 2.7.4