Skip to content

Commit c15f74c

Browse files
authored
Merge pull request #4448 from pallets/testing-docs
rewrite testing docs
2 parents d6496c8 + 761d7e1 commit c15f74c

File tree

2 files changed

+226
-370
lines changed

2 files changed

+226
-370
lines changed

docs/api.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ thing, like it does for :class:`request` and :class:`session`.
168168
:attr:`Flask.app_ctx_globals_class`, which defaults to
169169
:class:`ctx._AppCtxGlobals`.
170170

171-
This is a good place to store resources during a request. During
172-
testing, you can use the :ref:`faking-resources` pattern to
173-
pre-configure such resources.
171+
This is a good place to store resources during a request. For
172+
example, a ``before_request`` function could load a user object from
173+
a session id, then set ``g.user`` to be used in the view function.
174174

175175
This is a proxy. See :ref:`notes-on-proxies` for more information.
176176

0 commit comments

Comments
 (0)