summaryrefslogtreecommitdiff
path: root/docs/topics/testing
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-07-30 11:52:52 +0100
committerAndrew Godwin <andrew@aeracode.org>2013-07-30 11:52:52 +0100
commit68e0a169c4f9fa7f8071e014b274fd59e970f9a3 (patch)
treeba8aac00ab318a623fe85a6cea0514e9ee86ebf1 /docs/topics/testing
parent086389f5fc64bc47661f53332bf6ab3e2e882392 (diff)
Rename pre_ and post_syncdb to *_migrate, with aliases from old names
Diffstat (limited to 'docs/topics/testing')
-rw-r--r--docs/topics/testing/advanced.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index 4d7f22aaa2..6d9ea8d5c1 100644
--- a/docs/topics/testing/advanced.txt
+++ b/docs/topics/testing/advanced.txt
@@ -182,7 +182,7 @@ Advanced features of ``TransactionTestCase``
By default, ``available_apps`` is set to ``None``. After each test, Django
calls :djadmin:`flush` to reset the database state. This empties all tables
- and emits the :data:`~django.db.models.signals.post_syncdb` signal, which
+ and emits the :data:`~django.db.models.signals.post_migrate` signal, which
re-creates one content type and three permissions for each model. This
operation gets expensive proportionally to the number of models.
@@ -190,13 +190,13 @@ Advanced features of ``TransactionTestCase``
behave as if only the models from these applications were available. The
behavior of ``TransactionTestCase`` changes as follows:
- - :data:`~django.db.models.signals.post_syncdb` is fired before each
+ - :data:`~django.db.models.signals.post_migrate` is fired before each
test to create the content types and permissions for each model in
available apps, in case they're missing.
- After each test, Django empties only tables corresponding to models in
available apps. However, at the database level, truncation may cascade to
related models in unavailable apps. Furthermore
- :data:`~django.db.models.signals.post_syncdb` isn't fired; it will be
+ :data:`~django.db.models.signals.post_migrate` isn't fired; it will be
fired by the next ``TransactionTestCase``, after the correct set of
applications is selected.
@@ -205,10 +205,10 @@ Advanced features of ``TransactionTestCase``
cause unrelated tests to fail. Be careful with tests that use sessions;
the default session engine stores them in the database.
- Since :data:`~django.db.models.signals.post_syncdb` isn't emitted after
+ Since :data:`~django.db.models.signals.post_migrate` isn't emitted after
flushing the database, its state after a ``TransactionTestCase`` isn't the
same as after a ``TestCase``: it's missing the rows created by listeners
- to :data:`~django.db.models.signals.post_syncdb`. Considering the
+ to :data:`~django.db.models.signals.post_migrate`. Considering the
:ref:`order in which tests are executed <order-of-tests>`, this isn't an
issue, provided either all ``TransactionTestCase`` in a given test suite
declare ``available_apps``, or none of them.