Skip to content
Myr

Merge pull request #1380 from KWinston/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Add line of code required to run examples for Other Testing Tricks section

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parents 20f62e8, 6bbbb72 · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:docs/testing.rst+2 added
205 unmodified lines
206temporarily. With this you can access the :class:`~flask.request`,207:class:`~flask.g` and :class:`~flask.session` objects like in view208functions. Here is a full example that demonstrates this approach::209210 import flask211 212 app = flask.Flask(__name__)213214 with app.test_request_context('/?name=Peter'):215 assert flask.request.path == '/'
140 unmodified lines