mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[1.7.x] Fixed #23421 -- Corrected TEST SERIALIZE setting.
Thanks gkoller for the report and Markus Holtermann for review.
This commit is contained in:
@@ -704,6 +704,19 @@ test database will use the name ``'test_' + DATABASE_NAME``.
|
||||
|
||||
See :ref:`the-test-database`.
|
||||
|
||||
.. setting:: TEST_SERIALIZE
|
||||
|
||||
SERIALIZE
|
||||
^^^^^^^^^
|
||||
|
||||
.. versionadded:: 1.7.1
|
||||
|
||||
Boolean value to control whether or not the default test runnner serializes the
|
||||
database into an in-memory JSON string before running tests (used to restore
|
||||
the database state between tests if you don't have transactions). You can set
|
||||
this to ``False`` to speed up creation time if you don't have any test classes
|
||||
with :ref:`serialized_rollback=True <test-case-serialized-rollback>`.
|
||||
|
||||
.. setting:: TEST_CREATE
|
||||
|
||||
CREATE_DB
|
||||
|
||||
@@ -70,3 +70,6 @@ Bugfixes
|
||||
|
||||
* Made ``migrations.RunSQL`` no longer require percent sign escaping. This is
|
||||
now consistent with ``cursor.execute()`` (:ticket:`23426`).
|
||||
|
||||
* Made the :setting:`SERIALIZE <TEST_SERIALIZE>` entry in the
|
||||
:setting:`TEST <DATABASE-TEST>` dictionary usable (:ticket:`23421`).
|
||||
|
||||
@@ -507,8 +507,14 @@ can be useful during testing.
|
||||
``serialize`` determines if Django serializes the database into an
|
||||
in-memory JSON string before running tests (used to restore the database
|
||||
state between tests if you don't have transactions). You can set this to
|
||||
False to significantly speed up creation time if you know you don't need
|
||||
data persistence outside of test fixtures.
|
||||
``False`` to speed up creation time if you don't have any test classes
|
||||
with :ref:`serialized_rollback=True <test-case-serialized-rollback>`.
|
||||
|
||||
.. versionadded:: 1.7.1
|
||||
|
||||
If you are using the default test runner, you can control this with the
|
||||
the :setting:`SERIALIZE <TEST_SERIALIZE>` entry in the
|
||||
:setting:`TEST <DATABASE-TEST>` dictionary
|
||||
|
||||
Returns the name of the test database that it created.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user