diff options
| author | Theron Luhn <theron@luhn.com> | 2020-12-11 09:22:15 -0800 |
|---|---|---|
| committer | Theron Luhn <theron@luhn.com> | 2020-12-11 09:22:15 -0800 |
| commit | ea25ec5cd5715ab3dcf266a968166425e279927a (patch) | |
| tree | fc288c38e1fdad9605926f0b5f79f045d5b794b0 /docs/tutorials/wiki2/tests.rst | |
| parent | 43bd1a16de441d971bb6e1f3f6dbae055394e324 (diff) | |
| download | pyramid-ea25ec5cd5715ab3dcf266a968166425e279927a.tar.gz pyramid-ea25ec5cd5715ab3dcf266a968166425e279927a.tar.bz2 pyramid-ea25ec5cd5715ab3dcf266a968166425e279927a.zip | |
Revert "Remove `app_request` from wiki2 tests."
This reverts commit 86cb46d4d977d3a948308326bee628421cab93ea.
Diffstat (limited to 'docs/tutorials/wiki2/tests.rst')
| -rw-r--r-- | docs/tutorials/wiki2/tests.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 4ea2e2e15..dce14cf9b 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -63,6 +63,9 @@ Per-test fixtures The ``testapp`` is able to mutate the request environ such that the ``dbsession`` and ``tm`` fixtures are injected and used by any code that's touching ``request.dbsession`` and ``request.tm``. The ``testapp`` maintains a cookiejar, so it can be used to share state across requests, as well as the transaction database connection. +- ``app_request`` - a :class:`pyramid.request.Request` object that can be used for more lightweight tests versus the full ``testapp``. + The ``app_request`` can be passed to view functions and other code that need a fully functional request object. + - ``dummy_request`` - a :class:`pyramid.testing.DummyRequest` object that is very lightweight. This is a great object to pass to view functions that have minimal side-effects as it'll be fast and simple. |
