diff options
Diffstat (limited to 'test.py')
-rwxr-xr-x | test.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -309,24 +309,24 @@ class CachingMiddlewareTest(unittest.TestCase): if "maxage0" in environ["SCRIPT_NAME"]: headers.append(("Cache-Control", "max-age=0")) start_response("200 Found", headers) - return ["%d" % count] + return [str2bytes("%d" % count)] def testCache(self): res = Request(self)(self.cached) res.status(200) - self.assertEqual(res.get_data(), "1") + self.assertEqual(res.get_data(), b"1") res = Request(self)(self.cached) res.status(200) - self.assertEqual(res.get_data(), "1") + self.assertEqual(res.get_data(), b"1") def testNoCache(self): res = Request(self)(self.cached) res.status(200) - self.assertEqual(res.get_data(), "1") + self.assertEqual(res.get_data(), b"1") res = Request(self).setheader( "Cache-Control", "max-age=0")(self.cached) res.status(200) - self.assertEqual(res.get_data(), "2") + self.assertEqual(res.get_data(), b"2") class BasicAuthMiddlewareTest(unittest.TestCase): def setUp(self): |