summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-10-11 20:11:49 -0400
committerTim Graham <timograham@gmail.com>2013-10-11 20:12:52 -0400
commit8f5d3d16cb331915e397821efd6faf2700b2bc50 (patch)
tree9bf2b8a64a9eea51d28c5bed33a2c8b12ac28cda /docs
parentf787869d8cac48a7cf1336c78ce5ec3b06729ab6 (diff)
[1.6.x] Fixed #15582 -- Documented how TransactionTestCase.multi_db affects fixtures.
Thanks slinkp for the suggestion. Backport of dd839a2dfd from master
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing/overview.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/topics/testing/overview.txt b/docs/topics/testing/overview.txt
index 484fbfec89..0b550c4587 100644
--- a/docs/topics/testing/overview.txt
+++ b/docs/topics/testing/overview.txt
@@ -1282,6 +1282,10 @@ This flush/load procedure is repeated for each test in the test case, so you
can be certain that the outcome of a test will not be affected by another test,
or by the order of test execution.
+By default, fixtures are only loaded into the ``default`` database. If you are
+using multiple databases and set :attr:`multi_db=True
+<TransactionTestCase.multi_db>`, fixtures will be loaded into all databases.
+
URLconf configuration
~~~~~~~~~~~~~~~~~~~~~
@@ -1347,6 +1351,11 @@ For example::
This test case will flush *all* the test databases before running
``testIndexPageView``.
+The ``multi_db`` flag also affects into which databases the
+attr:`TransactionTestCase.fixtures` are loaded. By default (when
+``multi_db=False``), fixtures are only loaded into the ``default`` database.
+If ``multi_db=True``, fixtures are loaded into all databases.
+
.. _overriding-settings:
Overriding settings