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

Method test_multiread

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

Source from the content-addressed store, hash-verified

270 self.assertEqual([b'--:'], list(obj._unread))
271
272 def test_multiread(self):
273 obj = aiohttp.multipart.BodyPartReader(
274 self.boundary, {}, Stream(b'Hello,\r\n--:\r\n\r\nworld!\r\n--:--'))
275 result = yield from obj.read()
276 self.assertEqual(b'Hello,', result)
277 result = yield from obj.read()
278 self.assertEqual(b'', result)
279 self.assertTrue(obj.at_eof())
280
281 def test_read_multiline(self):
282 obj = aiohttp.multipart.BodyPartReader(

Callers

nothing calls this directly

Calls 3

readMethod · 0.95
at_eofMethod · 0.95
StreamClass · 0.70

Tested by

no test coverage detected