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

Method test_json_no_content

tests/test_client_response.py:199–208  ·  view source on GitHub ↗
(self, m_log)

Source from the content-addressed store, hash-verified

197
198 @unittest.mock.patch('aiohttp.client_reqrep.client_logger')
199 def test_json_no_content(self, m_log):
200 self.response.headers = {
201 'CONTENT-TYPE': 'data/octet-stream'}
202 self.response._content = b''
203
204 res = self.loop.run_until_complete(self.response.json())
205 self.assertIsNone(res)
206 m_log.warning.assert_called_with(
207 'Attempt to decode JSON with unexpected mimetype: %s',
208 'data/octet-stream')
209
210 def test_json_override_encoding(self):
211 def side_effect(*args, **kwargs):

Callers

nothing calls this directly

Calls 1

jsonMethod · 0.45

Tested by

no test coverage detected