(self)
| 1394 | resp.close() |
| 1395 | |
| 1396 | def test_read1_content_length(self): |
| 1397 | extradata = b"extradata" |
| 1398 | expected = b"Hello123\r\n" |
| 1399 | sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n' + expected + extradata) |
| 1400 | resp = client.HTTPResponse(sock, method="GET") |
| 1401 | resp.begin() |
| 1402 | self.assertEqual(resp.read1(2000), expected) |
| 1403 | # the file should now have our extradata ready to be read |
| 1404 | self.assertEqual(sock.file.read(), extradata) #we read to the end |
| 1405 | resp.close() |
| 1406 | |
| 1407 | def test_readline_bound_content_length(self): |
| 1408 | extradata = b"extradata" |
nothing calls this directly
no test coverage detected