forked from orbit-oss/flask
doc reqcontext fix teardown example (#2892)
* doc reqcontext fix teardown example * remove comments
This commit is contained in:
parent
7d9dcfa294
commit
b9b88b0cdf
1 changed files with 1 additions and 2 deletions
|
|
@ -193,7 +193,7 @@ contexts until the with block exits.
|
|||
|
||||
# teardown functions are called after the context with block exits
|
||||
|
||||
with app.test_client():
|
||||
with app.test_client() as client:
|
||||
client.get('/')
|
||||
# the contexts are not popped even though the request ended
|
||||
print(request.path)
|
||||
|
|
@ -201,7 +201,6 @@ contexts until the with block exits.
|
|||
# the contexts are popped and teardown functions are called after
|
||||
# the client with block exists
|
||||
|
||||
|
||||
Signals
|
||||
~~~~~~~
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue