MCPcopy
hub / github.com/aio-libs/aiohttp / test_del

Method test_del

tests/test_client_response.py:30–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

_post_initMethod · 0.95
_setup_connectionMethod · 0.95
ClientResponseClass · 0.90

Tested by

no test coverage detected