Changes between Initial Version and Version 1 of Ticket #30457, comment 18
- Timestamp:
- May 20, 2020, 5:32:42 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30457, comment 18
initial v1 1 I've created an alternate PR that adds `TestCase.captureOnCommitCallbacks` : [ PR #12944](https://github.com/django/django/pull/12944). This returns a context manager that captures the hooks and optionally calls them as the context manager yields. It also returns them as a list so assertions can be made on the hooks, and they can be selectively executed.1 I've created an alternate PR that adds `TestCase.captureOnCommitCallbacks` : [https://github.com/django/django/pull/12944 PR #12944]. This returns a context manager that captures the hooks and optionally calls them as the context manager yields. It also returns them as a list so assertions can be made on the hooks, and they can be selectively executed. 2 2 3 3 I also put the code in a package tested on Django 2.0+: https://github.com/adamchainz/django-capture-on-commit-callbacks