diff --git a/scrapy/trunk/scrapy/tests/test_http_response.py b/scrapy/trunk/scrapy/tests/test_http_response.py index c92aa5cad..61062a824 100644 --- a/scrapy/trunk/scrapy/tests/test_http_response.py +++ b/scrapy/trunk/scrapy/tests/test_http_response.py @@ -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')