| 463 | |
| 464 | class TestResponseData: |
| 465 | def test_init(self): |
| 466 | with pytest.raises(ValueError): |
| 467 | tresp(headers="foobar") |
| 468 | with pytest.raises(UnicodeEncodeError): |
| 469 | tresp(http_version="föö/bä.r") |
| 470 | with pytest.raises(UnicodeEncodeError): |
| 471 | tresp(reason="fööbär") |
| 472 | with pytest.raises(ValueError): |
| 473 | tresp(content="foobar") |
| 474 | with pytest.raises(ValueError): |
| 475 | tresp(trailers="foobar") |
| 476 | |
| 477 | assert isinstance(tresp(headers=()).headers, Headers) |
| 478 | assert isinstance(tresp(trailers=()).trailers, Headers) |
| 479 | |
| 480 | |
| 481 | class TestResponseCore: |