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

Method test_read_json

tests/test_multipart.py:389–394  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

387 self.assertEqual('', result)
388
389 def test_read_json(self):
390 obj = aiohttp.multipart.BodyPartReader(
391 self.boundary, {CONTENT_TYPE: 'application/json'},
392 Stream(b'{"test": "passed"}\r\n--:--'))
393 result = yield from obj.json()
394 self.assertEqual({'test': 'passed'}, result)
395
396 def test_read_json_encoding(self):
397 obj = aiohttp.multipart.BodyPartReader(

Callers

nothing calls this directly

Calls 2

jsonMethod · 0.95
StreamClass · 0.70

Tested by

no test coverage detected