Browse Source

Merge pull request #751 from ThomasWaldmann/sprint-branch

fixing issues found while debugging, fix error in 1 test
pull/753/merge
Armin Ronacher 12 years ago
parent
commit
7f35fc2935
  1. 2
      flask/app.py
  2. 3
      flask/testsuite/appctx.py

2
flask/app.py

@ -1551,7 +1551,7 @@ class Flask(_PackageBoundObject):
# set the headers and status. We do this because there can be
# some extra logic involved when creating these objects with
# specific values (like default content type selection).
if isinstance(rv, string_types):
if isinstance(rv, string_types + (bytes, )):
rv = self.response_class(rv, headers=headers, status=status)
headers = status = None
else:

3
flask/testsuite/appctx.py

@ -87,8 +87,9 @@ class AppContextTestCase(FlaskTestCase):
with flask._app_ctx_stack.top:
with flask._request_ctx_stack.top:
pass
self.assert_true(flask._request_ctx_stack.request.environ
self.assert_true(flask._request_ctx_stack.top.request.environ
['werkzeug.request'] is not None)
return u''
c = app.test_client()
c.get('/')
self.assertEqual(called, ['request', 'app'])

Loading…
Cancel
Save