mirror of https://github.com/scrapy/scrapy.git
Add a test for the copy of cb_kwargs from Request to Response
This commit is contained in:
parent
df937d8280
commit
5ff9eb90ea
|
|
@ -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"""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue