mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #20028 -- Made atomic usable on callable instances.
Thanks Anssi for the report.
This commit is contained in:
@@ -300,6 +300,17 @@ class AtomicErrorsTests(TransactionTestCase):
|
||||
transaction.leave_transaction_management()
|
||||
|
||||
|
||||
class AtomicMiscTests(TransactionTestCase):
|
||||
|
||||
def test_wrap_callable_instance(self):
|
||||
# Regression test for #20028
|
||||
class Callable(object):
|
||||
def __call__(self):
|
||||
pass
|
||||
# Must not raise an exception
|
||||
transaction.atomic(Callable())
|
||||
|
||||
|
||||
class IgnorePendingDeprecationWarningsMixin(object):
|
||||
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user