Skip to content

Commit 92467da

Browse files
committed
Rename fixture uses to push request context
During tests execution request context has been pushed (not application context!), so name it appropriately. Update documentation as well.
1 parent 48633f7 commit 92467da

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/features.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ An instance of ``app.test_client``. Typically refers to
8484

8585
.. hint::
8686

87-
During tests execution the application has pushed context, e.g.
87+
During tests execution the request context has been pushed, e.g.
8888
``url_for``, ``session`` and other context bound objects are available
8989
without context managers.
9090

pytest_flask/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def test_json(client):
6464

6565

6666
@pytest.fixture(autouse=True)
67-
def _push_application_context(request):
68-
"""During tests execution application has pushed context, e.g. `url_for`,
67+
def _push_request_context(request):
68+
"""During tests execution request context has been pushed, e.g. `url_for`,
6969
`session`, etc. can be used in tests as is::
7070
7171
def test_app(app, client):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
def test_app(app):
2929
assert not app.debug, 'Ensure the app not in debug mode'
3030
31-
During tests execution the application has pushed context, e.g. ``url_for``,
31+
During tests execution the request context has been pushed, e.g. ``url_for``,
3232
``session`` and other context bound objects are available without context
3333
managers:
3434

0 commit comments

Comments
 (0)