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

Method test_read_text_encoding

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

Source from the content-addressed store, hash-verified

358 self.assertEqual('Hello, world!', result)
359
360 def test_read_text_encoding(self):
361 obj = aiohttp.multipart.BodyPartReader(
362 self.boundary, {},
363 Stream('Привет, Мир!\r\n--:--'.encode('cp1251')))
364 result = yield from obj.text(encoding='cp1251')
365 self.assertEqual('Привет, Мир!', result)
366
367 def test_read_text_guess_encoding(self):
368 obj = aiohttp.multipart.BodyPartReader(

Callers

nothing calls this directly

Calls 3

textMethod · 0.95
encodeMethod · 0.80
StreamClass · 0.70

Tested by

no test coverage detected