(self)
| 28 | gc.collect() |
| 29 | |
| 30 | def test_del(self): |
| 31 | response = ClientResponse('get', 'http://del-cl-resp.org') |
| 32 | response._post_init(self.loop) |
| 33 | |
| 34 | connection = unittest.mock.Mock() |
| 35 | response._setup_connection(connection) |
| 36 | self.loop.set_exception_handler(lambda loop, ctx: None) |
| 37 | |
| 38 | with self.assertWarns(ResourceWarning): |
| 39 | del response |
| 40 | gc.collect() |
| 41 | |
| 42 | connection.close.assert_called_with() |
| 43 | |
| 44 | def test_close(self): |
| 45 | self.response._connection = self.connection |
nothing calls this directly
no test coverage detected