(self)
| 394 | self.assertEqual({'test': 'passed'}, result) |
| 395 | |
| 396 | def test_read_json_encoding(self): |
| 397 | obj = aiohttp.multipart.BodyPartReader( |
| 398 | self.boundary, {CONTENT_TYPE: 'application/json'}, |
| 399 | Stream('{"тест": "пассед"}\r\n--:--'.encode('cp1251'))) |
| 400 | result = yield from obj.json(encoding='cp1251') |
| 401 | self.assertEqual({'тест': 'пассед'}, result) |
| 402 | |
| 403 | def test_read_json_guess_encoding(self): |
| 404 | obj = aiohttp.multipart.BodyPartReader( |