(self)
| 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() |