(self)
| 867 | self.assertTrue(resp.closed) |
| 868 | |
| 869 | def test_partial_reads_past_end(self): |
| 870 | # if we have Content-Length, clip reads to the end |
| 871 | body = "HTTP/1.1 200 Ok\r\nContent-Length: 4\r\n\r\nText" |
| 872 | sock = FakeSocket(body) |
| 873 | resp = client.HTTPResponse(sock) |
| 874 | resp.begin() |
| 875 | self.assertEqual(resp.read(10), b'Text') |
| 876 | self.assertTrue(resp.isclosed()) |
| 877 | self.assertFalse(resp.closed) |
| 878 | resp.close() |
| 879 | self.assertTrue(resp.closed) |
| 880 | |
| 881 | def test_partial_readintos_past_end(self): |
| 882 | # if we have Content-Length, clip readintos to the end |
nothing calls this directly
no test coverage detected