summaryrefslogtreecommitdiff
path: root/docs/topics/testing/advanced.txt
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2021-02-14 22:42:47 -0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-02-24 20:31:11 +0100
commit3089018e951dcca568574c0e0ebf9d8aab112389 (patch)
tree932c0c26621d115185561feded6987a57771a3ea /docs/topics/testing/advanced.txt
parentaf685b5f00a2a38ec596ff905d5f70455185b6d7 (diff)
Fixed #32446 -- Deprecated SERIALIZE test database setting.
Whether or not the state of a test database should be serialized can be inferred from the set of databases allowed to be access from discovered TestCase/TransactionTestCase enabling the serialized_rollback feature which makes this setting unnecessary. This should make a significant test suite bootstraping time difference on large projects that didn't explicitly disable test database serialization.
Diffstat (limited to 'docs/topics/testing/advanced.txt')
-rw-r--r--docs/topics/testing/advanced.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index b20812c745..97072eea83 100644
--- a/docs/topics/testing/advanced.txt
+++ b/docs/topics/testing/advanced.txt
@@ -718,7 +718,7 @@ utility methods in the ``django.test.utils`` module.
Performs global post-test teardown, such as removing instrumentation from
the template system and restoring normal email services.
-.. function:: setup_databases(verbosity, interactive, *, time_keeper=None, keepdb=False, debug_sql=False, parallel=0, aliases=None, **kwargs)
+.. function:: setup_databases(verbosity, interactive, *, time_keeper=None, keepdb=False, debug_sql=False, parallel=0, aliases=None, serialized_aliases=None, **kwargs)
Creates the test databases.
@@ -730,11 +730,20 @@ utility methods in the ``django.test.utils`` module.
databases should be setup for. If it's not provided, it defaults to all of
:setting:`DATABASES` aliases.
+ The ``serialized_aliases`` argument determines what subset of ``aliases``
+ test databases should have their state serialized to allow usage of the
+ :ref:`serialized_rollback <test-case-serialized-rollback>` feature. If
+ it's not provided, it defaults to ``aliases``.
+
.. versionchanged:: 3.2
The ``time_keeper`` kwarg was added, and all kwargs were made
keyword-only.
+ .. versionchanged:: 4.0
+
+ The ``serialized_aliases`` kwarg was added.
+
.. function:: teardown_databases(old_config, parallel=0, keepdb=False)
Destroys the test databases, restoring pre-test conditions.