(self)
| 1429 | resp.close() |
| 1430 | |
| 1431 | def test_readlines_content_length(self): |
| 1432 | extradata = b"extradata" |
| 1433 | expected = b"Hello123\r\n" |
| 1434 | sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n' + expected + extradata) |
| 1435 | resp = client.HTTPResponse(sock, method="GET") |
| 1436 | resp.begin() |
| 1437 | self.assertEqual(resp.readlines(2000), [expected]) |
| 1438 | # the file should now have our extradata ready to be read |
| 1439 | self.assertEqual(sock.file.read(), extradata) #we read to the end |
| 1440 | resp.close() |
| 1441 | |
| 1442 | def test_read1_content_length(self): |
| 1443 | extradata = b"extradata" |
nothing calls this directly
no test coverage detected