Skip to content

Commit

Permalink
Merge pull request #4448 from pallets/testing-docs
Browse files Browse the repository at this point in the history
rewrite testing docs
  • Loading branch information
davidism authored Feb 13, 2022
2 parents d6496c8 + 761d7e1 commit c15f74c
Show file tree
Hide file tree
Showing 2 changed files with 226 additions and 370 deletions.
6 changes: 3 additions & 3 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ thing, like it does for :class:`request` and :class:`session`.
:attr:`Flask.app_ctx_globals_class`, which defaults to
:class:`ctx._AppCtxGlobals`.

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

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

Expand Down
Loading

0 comments on commit c15f74c

Please sign in to comment.