(self)
| 185 | self.assertIsNone(self.response._connection) |
| 186 | |
| 187 | def test_json_custom_loader(self): |
| 188 | self.response.headers = { |
| 189 | 'CONTENT-TYPE': 'application/json;charset=cp1251'} |
| 190 | self.response._content = b'data' |
| 191 | |
| 192 | def custom(content): |
| 193 | return content + '-custom' |
| 194 | |
| 195 | res = self.loop.run_until_complete(self.response.json(loads=custom)) |
| 196 | self.assertEqual(res, 'data-custom') |
| 197 | |
| 198 | @unittest.mock.patch('aiohttp.client_reqrep.client_logger') |
| 199 | def test_json_no_content(self, m_log): |