diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-06-06 11:06:26 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-06-06 11:06:26 +0200 |
commit | 27ed9839582c4fce9a0fff82281fb2e302be808e (patch) | |
tree | 23e01db53d7d51b73de739dfbdb19e4584fb8a8f /test.py | |
parent | a5634dea0d4f24d6f27ba5d7e50c773979eec93c (diff) | |
download | wsgitools-27ed9839582c4fce9a0fff82281fb2e302be808e.tar.gz |
fix RequestLogWSGIFilterTest
Clarify the type of the log file-like passed to RequestLogWSGIFilter.
Diffstat (limited to 'test.py')
-rwxr-xr-x | test.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |