(self)
| 821 | self.assertTrue(resp.closed) |
| 822 | |
| 823 | def test_partial_reads_past_end(self): |
| 824 | # if we have Content-Length, clip reads to the end |
| 825 | body = "HTTP/1.1 200 Ok\r\nContent-Length: 4\r\n\r\nText" |
| 826 | sock = FakeSocket(body) |
| 827 | resp = client.HTTPResponse(sock) |
| 828 | resp.begin() |
| 829 | self.assertEqual(resp.read(10), b'Text') |
| 830 | self.assertTrue(resp.isclosed()) |
| 831 | self.assertFalse(resp.closed) |
| 832 | resp.close() |
| 833 | self.assertTrue(resp.closed) |
| 834 | |
| 835 | def test_partial_readintos_past_end(self): |
| 836 | # if we have Content-Length, clip readintos to the end |
nothing calls this directly
no test coverage detected