MCPcopy
hub / github.com/pallets/flask / test_context_test

Function test_context_test

tests/test_reqctx.py:123–132  ·  tests/test_reqctx.py::test_context_test
(app)

Source from the content-addressed store, hash-verified

121
122
123def test_context_test(app):
124 assert not flask.request
125 assert not flask.has_request_context()
126 ctx = app.test_request_context()
127 ctx.push()
128 try:
129 assert flask.request
130 assert flask.has_request_context()
131 finally:
132 ctx.pop()
133
134
135def test_manual_context_binding(app):

Callers

nothing calls this directly

Calls 3

test_request_contextMethod · 0.80
pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected