(self)
| 483 | resp.close() |
| 484 | |
| 485 | def test_post_data(self): |
| 486 | for meth in ClientRequest.POST_METHODS: |
| 487 | req = ClientRequest( |
| 488 | meth, 'http://python.org/', |
| 489 | data={'life': '42'}, loop=self.loop) |
| 490 | resp = req.send(self.transport, self.protocol) |
| 491 | self.assertEqual('/', req.path) |
| 492 | self.assertEqual(b'life=42', req.body) |
| 493 | self.assertEqual('application/x-www-form-urlencoded', |
| 494 | req.headers['CONTENT-TYPE']) |
| 495 | self.loop.run_until_complete(req.close()) |
| 496 | resp.close() |
| 497 | |
| 498 | @unittest.mock.patch( |
| 499 | 'aiohttp.client_reqrep.ClientRequest.update_body_from_data') |
nothing calls this directly
no test coverage detected