diff options
Diffstat (limited to 'docs/topics/testing.txt')
| -rw-r--r-- | docs/topics/testing.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index 974856b0c4..2de12390ad 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -138,10 +138,11 @@ and execute those lines while checking that the results match. In the case of model tests, note that the test runner takes care of creating its own test database. That is, any test that accesses a database -- by creating and saving model instances, for example -- will not affect your -production database. Each doctest begins with a "blank slate" -- a fresh -database containing an empty table for each model. (See the section on -fixtures, below, for more on this.) Note that to use this feature, the database -user Django is connecting as must have ``CREATE DATABASE`` rights. +production database. However, the database is not refreshed between doctests, +so if your doctest requires a certain state you should consider flushin the +database or loading a fixture. (See the section on fixtures, below, for more +on this.) Note that to use this feature, the database user Django is connecting +as must have ``CREATE DATABASE`` rights. For more details about how doctest works, see the `standard library documentation for doctest`_. |
