mirror of https://github.com/scrapy/scrapy.git
Added missing test for change in r769
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40772
This commit is contained in:
parent
91eff31f18
commit
9de6ee5109
|
|
@ -32,9 +32,15 @@ class ResponseTest(unittest.TestCase):
|
|||
assert r.headers is not headers
|
||||
self.assertEqual(r.headers["caca"], "coco")
|
||||
|
||||
r = Response("http://www.example.com", status=301)
|
||||
self.assertEqual(r.status, 301)
|
||||
r = Response("http://www.example.com", status='301')
|
||||
self.assertEqual(r.status, 301)
|
||||
self.assertRaises(ValueError, Response, "http://example.com", status='lala200')
|
||||
|
||||
def test_copy(self):
|
||||
"""Test Response copy"""
|
||||
|
||||
|
||||
r1 = Response("http://www.example.com", body="Some body")
|
||||
r1.meta['foo'] = 'bar'
|
||||
r1.flags.append('cached')
|
||||
|
|
|
|||
Loading…
Reference in New Issue