Пример #1
0
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'])
Пример #2
0
 def setUp(self):
     self.response = Response("http://www.example.com/page.html",
         headers={"Content-TYpe": "text/html"})
     self.wrapped = WrappedResponse(self.response)