Scrapy, a fast high-level web crawling & scraping framework for Python.
Add a test for the copy of cb_kwargs from Request to Response
Adrián Chaves5ff9eb90ea9d
diff --git a/tests/test_http_response.py b/tests/test_http_response.pyindex 960ecea3e..39f5fe750 100644--- a/tests/test_http_response.py+++ b/tests/test_http_response.py@@ -72,6 +72,12 @@ class BaseResponseTest(unittest.TestCase):r1 = self.response_class("http://www.example.com", body=b"Some body", request=req)assert r1.meta is req.meta+ def test_copy_cb_kwargs(self):+ req = Request("http://www.example.com")+ req.cb_kwargs['foo'] = 'bar'+ r1 = self.response_class("http://www.example.com", body=b"Some body", request=req)+ assert r1.cb_kwargs is req.cb_kwargs+def test_copy_inherited_classes(self):"""Test Response children copies preserve their class"""