1
0
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:
Aymeric Augustin
2013-03-12 10:52:16 +01:00
parent 4846e2b744
commit 885d98d24a
2 changed files with 13 additions and 1 deletions

View File

@@ -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):