summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2013-06-06 11:06:26 +0200
committerHelmut Grohne <helmut@subdivi.de>2013-06-06 11:06:26 +0200
commit27ed9839582c4fce9a0fff82281fb2e302be808e (patch)
tree23e01db53d7d51b73de739dfbdb19e4584fb8a8f /test.py
parenta5634dea0d4f24d6f27ba5d7e50c773979eec93c (diff)
downloadwsgitools-27ed9839582c4fce9a0fff82281fb2e302be808e.tar.gz
fix RequestLogWSGIFilterTest
Clarify the type of the log file-like passed to RequestLogWSGIFilter.
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)