Added missing test for change in r769

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40772
This commit is contained in:
elpolilla 2009-01-26 15:25:53 +00:00
parent 91eff31f18
commit 9de6ee5109
1 changed files with 7 additions and 1 deletions

View File

@ -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')