(self)
| 1440 | resp.close() |
| 1441 | |
| 1442 | def test_read1_content_length(self): |
| 1443 | extradata = b"extradata" |
| 1444 | expected = b"Hello123\r\n" |
| 1445 | sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n' + expected + extradata) |
| 1446 | resp = client.HTTPResponse(sock, method="GET") |
| 1447 | resp.begin() |
| 1448 | self.assertEqual(resp.read1(2000), expected) |
| 1449 | # the file should now have our extradata ready to be read |
| 1450 | self.assertEqual(sock.file.read(), extradata) #we read to the end |
| 1451 | resp.close() |
| 1452 | |
| 1453 | def test_readline_bound_content_length(self): |
| 1454 | extradata = b"extradata" |
nothing calls this directly
no test coverage detected