httplib test for early eof response. related to Issue13684
This commit is contained in:
parent
48d886b725
commit
f5aaf6f025
|
@ -349,6 +349,14 @@ class BasicTest(TestCase):
|
|||
resp.begin()
|
||||
self.assertRaises(httplib.LineTooLong, resp.read)
|
||||
|
||||
def test_early_eof(self):
|
||||
# Test httpresponse with no \r\n termination,
|
||||
body = "HTTP/1.1 200 Ok"
|
||||
sock = FakeSocket(body)
|
||||
resp = httplib.HTTPResponse(sock)
|
||||
resp.begin()
|
||||
self.assertEqual(resp.read(), '')
|
||||
self.assertTrue(resp.isclosed())
|
||||
|
||||
class OfflineTest(TestCase):
|
||||
def test_responses(self):
|
||||
|
|
Loading…
Reference in New Issue