summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorMoayad Mardini <moayad.m@gmail.com>2014-07-27 11:12:39 +0300
committerTim Graham <timograham@gmail.com>2014-07-28 10:58:34 -0400
commit6c70b1d7df4bc6f666ee9fa55a305e7347862095 (patch)
tree59f749721d64b9805669366707b9d23116889790 /docs/topics
parenta7fe87bd286fad4b4e6f3a294bda248bb980e900 (diff)
[1.6.x] Fixed #22491 -- documented how select_for_update() should be tested.
Thanks Andreas Pelme for the report. Backport of 668d432d0a from master
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/testing/tools.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index 3961ce852a..db11475a6f 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -623,7 +623,10 @@ to test the effects of commit and rollback:
While ``commit`` and ``rollback`` operations still *appear* to work when
used in ``TestCase``, no actual commit or rollback will be performed by the
database. This can cause your tests to pass or fail unexpectedly. Always
- use ``TransactionTestCase`` when testing transactional behavior.
+ use ``TransactionTestCase`` when testing transactional behavior or any code
+ that can't normally be excuted in autocommit mode
+ (:meth:`~django.db.models.query.QuerySet.select_for_update()` is an
+ example).
.. versionchanged:: 1.5