(self)
| 1001 | assert int(r.headers["content-length"]) == 7 |
| 1002 | |
| 1003 | def test_modify(self): |
| 1004 | r = tresp() |
| 1005 | assert "content-encoding" not in r.headers |
| 1006 | r.encode("gzip") |
| 1007 | |
| 1008 | r.content = b"foo" |
| 1009 | assert r.raw_content != b"foo" |
| 1010 | r.decode() |
| 1011 | assert r.raw_content == b"foo" |
| 1012 | |
| 1013 | with pytest.raises(TypeError): |
| 1014 | r.content = "foo" |
| 1015 | |
| 1016 | def test_unknown_ce(self): |
| 1017 | r = tresp() |