From: Kenneth Reitz Date: Sun, 27 Nov 2011 16:24:59 +0000 (-0500) Subject: Added test for Request.sent. X-Git-Tag: v0.8.4~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bb4c4ebe628ad1fbb54c673ee4e409ed7376b2e;p=services%2Fpython-requests.git Added test for Request.sent. #291 --- diff --git a/test_requests.py b/test_requests.py index 7e4f146..2ee250b 100755 --- a/test_requests.py +++ b/test_requests.py @@ -51,7 +51,7 @@ class RequestsTestSuite(unittest.TestCase): self.httpbin = c _httpbin = True - time.sleep(1) + time.sleep(.01) @@ -81,6 +81,11 @@ class RequestsTestSuite(unittest.TestCase): r = requests.get(httpbin('/get')) self.assertEqual(r.status_code, 200) + def test_response_sent(self): + r = requests.get(httpbin('/get')) + + self.assertTrue(r.request.sent) + def test_HTTP_302_ALLOW_REDIRECT_GET(self): r = requests.get(httpbin('redirect', '1')) self.assertEqual(r.status_code, 200)