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

Method test_post_data

tests/test_client_request.py:485–496  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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')

Callers

nothing calls this directly

Calls 4

sendMethod · 0.95
closeMethod · 0.95
ClientRequestClass · 0.90
closeMethod · 0.45

Tested by

no test coverage detected