summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsarahboyce <sarahvboyce95@gmail.com>2023-01-15 19:50:36 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-16 09:31:34 +0100
commit0fbdb9784da915fce5dcc1fe82bac9b4785749e5 (patch)
tree3b617bfc48a32aae381b48be271f4eadeab7777e /docs
parent05bcd5baafc0a5783923e32d2b7e2b7fff7d152a (diff)
Fixed #23718 -- Doc'd that test mirrors require TransactionTestCase.
Co-authored-by: Christian Bundy <me@christianbundy.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/settings.txt4
-rw-r--r--docs/topics/testing/advanced.txt4
2 files changed, 6 insertions, 2 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index aa8606a08b..315438fee8 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -828,7 +828,9 @@ but for all apps.
Default: ``None``
The alias of the database that this database should mirror during
-testing.
+testing. It depends on transactions and therefore must be used within
+:class:`~django.test.TransactionTestCase` instead of
+:class:`~django.test.TestCase`.
This setting exists to allow for testing of primary/replica
(referred to as master/slave by some databases)
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index 2cae3325a6..fafc4e0bbc 100644
--- a/docs/topics/testing/advanced.txt
+++ b/docs/topics/testing/advanced.txt
@@ -241,7 +241,9 @@ will *not* be created. Instead the connection to ``replica``
will be redirected to point at ``default``. As a result, writes to
``default`` will appear on ``replica`` -- but because they are actually
the same database, not because there is data replication between the
-two databases.
+two databases. As this depends on transactions, the tests must use
+:class:`~django.test.TransactionTestCase` instead of
+:class:`~django.test.TestCase`.
.. _topics-testing-creation-dependencies: