From 27ed9839582c4fce9a0fff82281fb2e302be808e Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 6 Jun 2013 11:06:26 +0200 Subject: fix RequestLogWSGIFilterTest Clarify the type of the log file-like passed to RequestLogWSGIFilter. --- test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test.py') 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) -- cgit v1.2.3