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

Function test_ctor_text

tests/test_web_response.py:718–728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

716
717
718def test_ctor_text():
719 resp = Response(text='test text')
720
721 assert 200 == resp.status
722 assert 'OK' == resp.reason
723 assert (CIMultiDict(
724 [('CONTENT-TYPE', 'text/plain; charset=utf-8'),
725 ('CONTENT-LENGTH', '9')]) == resp.headers)
726
727 assert resp.body == b'test text'
728 assert resp.text == 'test text'
729
730
731def test_ctor_charset():

Callers

nothing calls this directly

Calls 1

ResponseClass · 0.90

Tested by

no test coverage detected