#30457: on_commit should be triggered in a TestCase
------------------------------------+------------------------------------
Reporter: Bernhard Mäder | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: on_commit TestCase | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+------------------------------------
Comment (by Simon Charette):
> I still think the default behaviour of TestCase is cumbersome for
whenever one uses on_commit in a codebase.
I do agree on that and that's what motivated me to try to get things
working automatically but as you've said yourself it's quite hard to
emulate. This also contradicts the documentation about how transactional
behaviour should be tested using `TransactionTestCase`.
> It would be cool if the behaviour would even be available as a config
option (static member flag?) on TestCase.
Right. I guess we could also emit a runtime warning when `on_commit` is
used within a `TestCase` context that points at either this option or the
context decorator itself.
--
Ticket URL: <https://code.djangoproject.com/ticket/30457#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.3bc3e60585b9cec631350a055e992597%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.