summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test.py b/test.py
index cf40b92..2d1d29d 100755
--- a/test.py
+++ b/test.py
@@ -377,7 +377,10 @@ class RequestLogWSGIFilterTest(unittest.TestCase):
def testSimple(self):
app = applications.StaticContent("200 Found",
[("Content-Type", "text/plain")], b"nothing")
- log = io.StringIO()
+ if isinstance("x", bytes):
+ log = io.BytesIO()
+ else:
+ log = io.StringIO()
logfilter = filters.RequestLogWSGIFilter.creator(log)
app = filters.WSGIFilterMiddleware(app, logfilter)
req = Request(self)