diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2013-05-10 12:55:30 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2013-05-10 12:55:30 +0100 |
| commit | cb4b0de49e027f09f8abe63e2fa43f60fc1ef13f (patch) | |
| tree | 712da07b2b80fc503aea683c096a8774dceaad01 /docs/intro/tutorial05.txt | |
| parent | f6801a234fb9460eac80d146534ac340e178c466 (diff) | |
| parent | bdd285723f9b0044eca690634c412c1c3eec76c0 (diff) | |
Merge branch 'master' into schema-alteration
Diffstat (limited to 'docs/intro/tutorial05.txt')
| -rw-r--r-- | docs/intro/tutorial05.txt | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt index 3b0a95f253..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 </intro/tutorial01>`, using the shell to examine the behavior of a method, or running the application and entering data to check how it behaves. @@ -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):: |
