diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | tests/test_in_wsgiref.py | 1 | ||||
-rw-r--r-- | tests/test_response.py | 2 | ||||
-rw-r--r-- | webob/response.py | 3 |
4 files changed, 5 insertions, 3 deletions
@@ -20,3 +20,5 @@ Session.vim coverage.xml nosetests.xml env32/ + +_website/
\ No newline at end of file diff --git a/tests/test_in_wsgiref.py b/tests/test_in_wsgiref.py index e2d0471..fdd56ac 100644 --- a/tests/test_in_wsgiref.py +++ b/tests/test_in_wsgiref.py @@ -1,4 +1,3 @@ -from __future__ import with_statement import sys import logging import threading diff --git a/tests/test_response.py b/tests/test_response.py index 7509271..1f9422c 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -342,6 +342,8 @@ def test_from_file(): res = Response('test') inp = io.BytesIO(bytes_(str(res))) equal_resp(res, inp) + +def test_from_file2(): res = Response(app_iter=iter([b'test ', b'body']), content_type='text/plain') inp = io.BytesIO(bytes_(str(res))) diff --git a/webob/response.py b/webob/response.py index 85179d2..a454dae 100644 --- a/webob/response.py +++ b/webob/response.py @@ -214,10 +214,9 @@ class Response(object): self.body parts += map('%s: %s'.__mod__, self.headerlist) if not skip_body and self.body: - parts += ['', self.text] + parts += ['', self.text if PY3 else self.body] return '\n'.join(parts) - # # status, status_int # |