From 6bbbb72843d48b37bd6c22bbaa12edc20c03b76a Mon Sep 17 00:00:00 2001 From: Winston Kouch Date: Thu, 12 Mar 2015 23:32:08 -0400 Subject: [PATCH] Add import flask module required to run code on Other Testing Tricks --- docs/testing.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/testing.rst b/docs/testing.rst index 2e071a6b..e0853b96 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -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'):