diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-17 19:50:02 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-17 19:50:02 (GMT) |
commit | 1c84ac1f5528d26cb226210c2843b765efae83a4 (patch) | |
tree | 616a012d374352ea0f114d63fc565f69c8f8989d /Lib/test | |
parent | 48d761e2b4b8cef40349aa286f6f46fc6c6d0fa7 (diff) | |
download | cpython-1c84ac1f5528d26cb226210c2843b765efae83a4.zip cpython-1c84ac1f5528d26cb226210c2843b765efae83a4.tar.gz cpython-1c84ac1f5528d26cb226210c2843b765efae83a4.tar.bz2 |
Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.
Original patch by Simon Sapin.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_httplib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index f3c27c2..4410a93 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -162,6 +162,9 @@ class BasicTest(TestCase): sock = FakeSocket(body) resp = client.HTTPResponse(sock) resp.begin() + self.assertEqual(resp.read(0), b'') # Issue #20007 + self.assertFalse(resp.isclosed()) + self.assertFalse(resp.closed) self.assertEqual(resp.read(), b"Text") self.assertTrue(resp.isclosed()) self.assertFalse(resp.closed) |