class WrappedResponseTest(TestCase): def setUp(self): self.response = Response("http://www.example.com/page.html", headers={"Content-TYpe": "text/html"}) self.wrapped = WrappedResponse(self.response) def test_info(self): self.assertIs(self.wrapped.info(), self.wrapped) def test_get_all(self): # get_all result must be native string self.assertEqual(self.wrapped.get_all('content-type'), ['text/html'])
class WrappedResponseTest(TestCase): def setUp(self): self.response = Response("http://www.example.com/page.html", headers={"Content-TYpe": "text/html"}) self.wrapped = WrappedResponse(self.response) def test_info(self): self.assert_(self.wrapped.info() is self.wrapped) def test_getheaders(self): self.assertEqual(self.wrapped.getheaders('content-type'), ['text/html'])
class WrappedResponseTest(TestCase): def setUp(self): self.response = Response("http://www.example.com/page.html", headers={"Content-TYpe": "text/html"}) self.wrapped = WrappedResponse(self.response) def test_info(self): self.assert_(self.wrapped.info() is self.wrapped) def test_getheaders(self): self.assertEqual(self.wrapped.getheaders("content-type"), ["text/html"]) def test_get_all(self): # get_all result must be native string self.assertEqual(self.wrapped.get_all("content-type"), ["text/html"])