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

Method test_close

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

Source from the content-addressed store, hash-verified

123 self.assertIs(session._loop, asyncio.get_event_loop.return_value)
124
125 def test_close(self):
126 tr = unittest.mock.Mock()
127
128 conn = aiohttp.BaseConnector(loop=self.loop)
129 self.assertFalse(conn.closed)
130 conn._conns[1] = [(tr, object(), object())]
131 conn.close()
132
133 self.assertFalse(conn._conns)
134 self.assertTrue(tr.close.called)
135 self.assertTrue(conn.closed)
136
137 def test_get(self):
138 conn = aiohttp.BaseConnector(loop=self.loop)

Callers

nothing calls this directly

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected