summaryrefslogtreecommitdiff
path: root/docs/intro
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-05-06 13:55:02 -0400
committerTim Graham <timograham@gmail.com>2013-05-06 13:55:02 -0400
commitbc02a963db3aeebf7c349d83a492b6e093f42b00 (patch)
treeace0d051c8d29ba9993bf840af66bb4be5105ec7 /docs/intro
parente88680899490b9ed8b58c88ee78dc189506204c5 (diff)
Fixed #20177 - Corrected docs for django.test.utils.setup_test_environment.
Thanks vlad.london.uk@ for the report.
Diffstat (limited to 'docs/intro')
-rw-r--r--docs/intro/tutorial05.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt
index 3b0a95f253..261a5038ab 100644
--- a/docs/intro/tutorial05.txt
+++ b/docs/intro/tutorial05.txt
@@ -326,6 +326,13 @@ in the shell::
>>> from django.test.utils import setup_test_environment
>>> setup_test_environment()
+:meth:`~django.test.utils.setup_test_environment` installs a template renderer
+which will allow us to examine some additional attributes on responses such as
+``response.context`` that otherwise wouldn't be available. Note that this
+method *does not* setup a test database, so the following will be run against
+the existing database and the output may differ slightly depending on what
+polls you already created.
+
Next we need to import the test client class (later in ``tests.py`` we will use
the :class:`django.test.TestCase` class, which comes with its own client, so
this won't be required)::