Skip to content
Myr

Merge pull request #751 from ThomasWaldmann/sprint-branch

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fixing issues found while debugging, fix error in 1 test

authored by Armin Ronacher · committed by Armin Ronacher · parents abc1505, bbfef4c · Browse files · 2 files+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−2 removed

  • other:+3 added−2 removed

2 files+3 added−2 removed

modified:flask/testsuite/appctx.py+2 added-1 removed
85 unmodified lines
86 def index():87 with flask._app_ctx_stack.top:88 with flask._request_ctx_stack.top:89 pass90 self.assert_true(flask._request_ctx_stack.request.environ90 self.assert_true(flask._request_ctx_stack.top.request.environ91 ['werkzeug.request'] is not None)92 return u''93 c = app.test_client()94 c.get('/')95 self.assertEqual(called, ['request', 'app'])96
5 unmodified lines
modified:flask/app.py+1 added-1 removed
1549 unmodified lines
1550 # When we create a response object directly, we let the constructor1551 # set the headers and status. We do this because there can be1552 # some extra logic involved when creating these objects with1553 # specific values (like default content type selection).1554 if isinstance(rv, string_types):1554 if isinstance(rv, string_types + (bytes, )):1555 rv = self.response_class(rv, headers=headers, status=status)1556 headers = status = None1557 else:1558 rv = self.response_class.force_type(rv, request.environ)
257 unmodified lines