From bc02a963db3aeebf7c349d83a492b6e093f42b00 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 6 May 2013 13:55:02 -0400 Subject: Fixed #20177 - Corrected docs for django.test.utils.setup_test_environment. Thanks vlad.london.uk@ for the report. --- docs/intro/tutorial05.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/intro/tutorial05.txt') 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):: -- cgit v1.3 From 6c6c67f5a6150ca89bbcfb06561a61d2cd7730cf Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Tue, 7 May 2013 17:07:29 -0600 Subject: Fixed inconsistent punctuation in tutorial 5. --- docs/intro/tutorial05.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/intro/tutorial05.txt') diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt index 261a5038ab..97d1d96ad7 100644 --- a/docs/intro/tutorial05.txt +++ b/docs/intro/tutorial05.txt @@ -15,9 +15,9 @@ What are automated tests? Tests are simple routines that check the operation of your code. Testing operates at different levels. Some tests might apply to a tiny detail -- *does a particular model method return values as expected?*, while others -examine the overall operation of the software - *does a sequence of user inputs -on the site produce the desired result?* That's no different from the kind of +(*does a particular model method return values as expected?*) while others +examine the overall operation of the software (*does a sequence of user inputs +on the site produce the desired result?*). That's no different from the kind of testing you did earlier in :doc:`Tutorial 1 `, using the shell to examine the behavior of a method, or running the application and entering data to check how it behaves. -- cgit v1.3