Add import flask module required to run code on Other Testing Tricks

This commit is contained in:
Winston Kouch 2015-03-12 23:32:08 -04:00
parent ec5811d0a1
commit 6bbbb72843

View file

@ -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'):