diff options
| author | Chris Wedgwood <wedgemail@gmail.com> | 2022-09-29 04:58:45 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-09-29 06:00:56 +0200 |
| commit | 7607fc8990ec61b51d4a3baf0be51c28fa5f4605 (patch) | |
| tree | ad1bd73adf72d414035c5ebfc2e90116a056f46e /docs/topics/testing | |
| parent | b826b38847a170067a414658ca97ac07a413ae65 (diff) | |
[4.1.x] Fixed #33026 -- Mentioned RequestFactory in testing tools docs.
Backport of 468d06109778e3656229ac28c9019ea7246f9b79 from main
Diffstat (limited to 'docs/topics/testing')
| -rw-r--r-- | docs/topics/testing/tools.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 61788d2c1d..c4f64fef94 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -34,12 +34,15 @@ short: * Use Django's test client to establish that the correct template is being rendered and that the template is passed the correct context data. +* Use :class:`~django.test.RequestFactory` to test view functions directly, + bypassing the routing and middleware layers. + * Use in-browser frameworks like Selenium_ to test *rendered* HTML and the *behavior* of web pages, namely JavaScript functionality. Django also provides special support for those frameworks; see the section on :class:`~django.test.LiveServerTestCase` for more details. -A comprehensive test suite should use a combination of both test types. +A comprehensive test suite should use a combination of all of these test types. Overview and a quick example ---------------------------- |
