(self)
| 982 | |
| 983 | class TestMessageContentEncoding: |
| 984 | def test_simple(self): |
| 985 | r = tresp() |
| 986 | assert r.raw_content == b"message" |
| 987 | assert "content-encoding" not in r.headers |
| 988 | r.encode("gzip") |
| 989 | |
| 990 | assert r.headers["content-encoding"] |
| 991 | assert r.raw_content != b"message" |
| 992 | assert r.content == b"message" |
| 993 | assert r.raw_content != b"message" |
| 994 | |
| 995 | def test_update_content_length_header(self): |
| 996 | r = tresp() |