From d89f976bddb49fb168334960acc8979c3de991fa Mon Sep 17 00:00:00 2001 From: Eugene Morozov Date: Tue, 24 Aug 2021 23:29:55 +0300 Subject: Fixed #33054 -- Made TestCase.captureOnCommitCallbacks() capture callbacks recursively. --- docs/releases/4.0.txt | 3 +++ docs/topics/testing/tools.txt | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt index 45743c4139..53b738c8ec 100644 --- a/docs/releases/4.0.txt +++ b/docs/releases/4.0.txt @@ -368,6 +368,9 @@ Tests * The :option:`test --parallel` option now supports the value ``auto`` to run one test process for each processor core. +* :meth:`.TestCase.captureOnCommitCallbacks` now captures new callbacks added + while executing :func:`.transaction.on_commit` callbacks. + URLs ~~~~ diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 8e4f077fad..846d428980 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -912,6 +912,11 @@ It also provides an additional method: self.assertEqual(mail.outbox[0].subject, 'Contact Form') self.assertEqual(mail.outbox[0].body, 'I like your site') + .. versionchanged:: 4.0 + + In older versions, new callbacks added while executing + :func:`.transaction.on_commit` callbacks were not captured. + .. _live-test-server: ``LiveServerTestCase`` -- cgit v1.3