summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test.py b/test.py
index 8e628cd..946ee29 100755
--- a/test.py
+++ b/test.py
@@ -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):