Skip to content

Commit

Permalink
[1.6.x] Fixed #15582 -- Documented how TransactionTestCase.multi_db a…
Browse files Browse the repository at this point in the history
…ffects fixtures.

Thanks slinkp for the suggestion.

Backport of dd839a2 from master
  • Loading branch information
timgraham committed Oct 12, 2013
1 parent f787869 commit 8f5d3d1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/topics/testing/overview.txt
Expand Up @@ -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, can be certain that the outcome of a test will not be affected by another test,
or by the order of test execution. 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 URLconf configuration
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~


Expand Down Expand Up @@ -1347,6 +1351,11 @@ For example::
This test case will flush *all* the test databases before running This test case will flush *all* the test databases before running
``testIndexPageView``. ``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:


Overriding settings Overriding settings
Expand Down

0 comments on commit 8f5d3d1

Please sign in to comment.