| 214 | assert joined == absolute |
| 215 | |
| 216 | def test_shortcut_attributes(self): |
| 217 | r = self.response_class("http://example.com", body=b"hello") |
| 218 | if self.response_class == Response: |
| 219 | msg = "Response content isn't text" |
| 220 | with pytest.raises(AttributeError, match=msg): |
| 221 | r.text |
| 222 | with pytest.raises(NotSupported, match=msg): |
| 223 | r.css("body") |
| 224 | with pytest.raises(NotSupported, match=msg): |
| 225 | r.xpath("//body") |
| 226 | with pytest.raises(NotSupported, match=msg): |
| 227 | r.jmespath("body") |
| 228 | else: |
| 229 | r.text |
| 230 | r.css("body") |
| 231 | r.xpath("//body") |
| 232 | |
| 233 | # Response.follow |
| 234 | |