flask.g is now on the app context and not the request context

This commit is contained in:
Armin Ronacher 2012-12-21 11:45:42 +01:00
parent 61d43c7f12
commit 1949c4a9ab
9 changed files with 71 additions and 20 deletions

View file

@ -1104,8 +1104,11 @@ class BasicFunctionalityTestCase(FlaskTestCase):
c.get('/fail')
self.assert_(flask._request_ctx_stack.top is not None)
flask._request_ctx_stack.pop()
self.assert_(flask._app_ctx_stack.top is not None)
# implicit appctx disappears too
flask._request_ctx_stack.top.pop()
self.assert_(flask._request_ctx_stack.top is None)
self.assert_(flask._app_ctx_stack.top is None)
class ContextTestCase(FlaskTestCase):