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

Method test_release_not_opened

tests/test_connector.py:250–260  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

248 conn.close()
249
250 def test_release_not_opened(self):
251 conn = aiohttp.BaseConnector(loop=self.loop)
252 req = unittest.mock.Mock()
253 req.response = unittest.mock.Mock()
254 req.response.message = None
255
256 tr, proto = unittest.mock.Mock(), unittest.mock.Mock()
257 key = 1
258 conn._acquired[key].add(tr)
259 conn._release(key, req, tr, proto)
260 self.assertTrue(tr.close.called)
261
262 def test_connect(self):
263 tr, proto = unittest.mock.Mock(), unittest.mock.Mock()

Callers

nothing calls this directly

Calls 1

_releaseMethod · 0.95

Tested by

no test coverage detected