Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

update tests

Jalil SA578606779d0f
diff --git a/tests/test_http_response.py b/tests/test_http_response.py
index dbc9f1fef..cefdb1709 100644
--- a/tests/test_http_response.py
+++ b/tests/test_http_response.py
@@ -32,6 +32,9 @@ class BaseResponseTest(unittest.TestCase):
isinstance(self.response_class("http://example.com/"), self.response_class)
)
self.assertRaises(TypeError, self.response_class, b"http://example.com")
+ self.assertRaises(
+ TypeError, self.response_class, url="http://example.com", body={}
+ )
# body can be str or None
self.assertTrue(
isinstance(
@@ -192,6 +195,7 @@ class BaseResponseTest(unittest.TestCase):
self.assertRaisesRegex(AttributeError, msg, getattr, r, "text")
self.assertRaisesRegex(NotSupported, msg, r.css, "body")
self.assertRaisesRegex(NotSupported, msg, r.xpath, "//body")
+ self.assertRaisesRegex(NotSupported, msg, r.jmespath, "body")
else:
r.text
r.css("body")