Skip to content

Commit

Permalink
Merge pull request #1380 from KWinston/master
Browse files Browse the repository at this point in the history
Add line of code required to run examples for Other Testing Tricks section
  • Loading branch information
untitaker committed Apr 1, 2015
2 parents 20f62e8 + 6bbbb72 commit b57a076
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/testing.rst
Expand Up @@ -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'):
Expand Down

0 comments on commit b57a076

Please sign in to comment.