Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #15582 -- Documented how TransactionTestCase.multi_db affects f…

…ixtures.

Thanks slinkp for the suggestion.
  • Loading branch information...
commit dd839a2dfd6a30474a2b367a4b3ce70b26c3f318 1 parent ad17d6a
@timgraham timgraham authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 docs/topics/testing/overview.txt
View
9 docs/topics/testing/overview.txt
@@ -1229,6 +1229,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
~~~~~~~~~~~~~~~~~~~~~
@@ -1294,6 +1298,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
Please sign in to comment.
Something went wrong with that request. Please try again.