()
| 716 | |
| 717 | |
| 718 | def 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 | |
| 731 | def test_ctor_charset(): |