(self)
| 1177 | assert r.get_text(strict=False) == "foo" |
| 1178 | |
| 1179 | def test_cannot_decode(self): |
| 1180 | r = tresp() |
| 1181 | r.headers["content-type"] = "text/html; charset=utf8" |
| 1182 | r.raw_content = b"\xff" |
| 1183 | with pytest.raises(ValueError): |
| 1184 | assert r.text |
| 1185 | |
| 1186 | assert r.get_text(strict=False) == "\udcff" |
| 1187 | |
| 1188 | def test_cannot_encode(self): |
| 1189 | r = tresp() |