diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-11-16 11:21:15 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-12-21 08:12:25 +0100 |
commit | 74af60bb32f9009b838f7acee73c9a6cca2be265 (patch) | |
tree | caf42c66268d06101208a5e04f62865833b5d762 /mediagoblin/tests/tools.py | |
parent | bf3b9e783dc86b38864e66c2aab149472e636461 (diff) | |
download | mediagoblin-74af60bb32f9009b838f7acee73c9a6cca2be265.tar.lz mediagoblin-74af60bb32f9009b838f7acee73c9a6cca2be265.tar.xz mediagoblin-74af60bb32f9009b838f7acee73c9a6cca2be265.zip |
replace webob.Response with werkzeug Response
Replace webob usage in one more file. Document a TODO that should
be clarified, we should probably be using json_response rather than
Response() here.
Modify the TestMeddleware to not rely on the content_type attribute
being present, while werkzeug.wrappers Response() has it the BaseResponse()
object which is often returned in tests does not have it.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r-- | mediagoblin/tests/tools.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/tests/tools.py b/mediagoblin/tests/tools.py index 8c09c7ec..0e923aee 100644 --- a/mediagoblin/tests/tools.py +++ b/mediagoblin/tests/tools.py @@ -78,7 +78,7 @@ class TestingMeddleware(BaseMeddleware): def process_response(self, request, response): # All following tests should be for html only! - if response.content_type != "text/html": + if getattr(response, 'content_type', None) != "text/html": # Get out early return |