forked from orbit-oss/flask
Merge pull request #1380 from KWinston/master
Add line of code required to run examples for Other Testing Tricks section
This commit is contained in:
commit
b57a076fa3
1 changed files with 2 additions and 0 deletions
|
|
@ -207,6 +207,8 @@ temporarily. With this you can access the :class:`~flask.request`,
|
|||
:class:`~flask.g` and :class:`~flask.session` objects like in view
|
||||
functions. Here is a full example that demonstrates this approach::
|
||||
|
||||
import flask
|
||||
|
||||
app = flask.Flask(__name__)
|
||||
|
||||
with app.test_request_context('/?name=Peter'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue