(self, m_log)
| 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): |