(self)
| 1383 | resp.close() |
| 1384 | |
| 1385 | def test_readlines_content_length(self): |
| 1386 | extradata = b"extradata" |
| 1387 | expected = b"Hello123\r\n" |
| 1388 | sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n' + expected + extradata) |
| 1389 | resp = client.HTTPResponse(sock, method="GET") |
| 1390 | resp.begin() |
| 1391 | self.assertEqual(resp.readlines(2000), [expected]) |
| 1392 | # the file should now have our extradata ready to be read |
| 1393 | self.assertEqual(sock.file.read(), extradata) #we read to the end |
| 1394 | resp.close() |
| 1395 | |
| 1396 | def test_read1_content_length(self): |
| 1397 | extradata = b"extradata" |
nothing calls this directly
no test coverage detected