Ticket #9343: changes.txt

File changes.txt, 1.2 KB (added by davenaff, 8 years ago)
1Index: docs/topics/testing.txt
3--- docs/topics/testing.txt     (revision 9221)
4+++ docs/topics/testing.txt     (working copy)
5@@ -138,10 +138,11 @@
6 In the case of model tests, note that the test runner takes care of creating
7 its own test database. That is, any test that accesses a database -- by
8 creating and saving model instances, for example -- will not affect your
9-production database. Each doctest begins with a "blank slate" -- a fresh
10-database containing an empty table for each model. (See the section on
11-fixtures, below, for more on this.) Note that to use this feature, the database
12-user Django is connecting as must have ``CREATE DATABASE`` rights.
13+production database. However, the database is not refreshed between doctests,
14+so if your doctest requires a certain state you should consider flushin the
15+database or loading a fixture. (See the section on fixtures, below, for more
16+on this.) Note that to use this feature, the database user Django is connecting
17+as must have ``CREATE DATABASE`` rights.
19 For more details about how doctest works, see the `standard library
20 documentation for doctest`_.
Back to Top