summaryrefslogtreecommitdiff
path: root/tests/transactions
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-03-12 10:52:16 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-03-12 10:52:16 +0100
commit885d98d24ac842708347c36644c61fc323c081ec (patch)
tree88d7bbd22470aff83c7ff07426a891625472a333 /tests/transactions
parent4846e2b744f4a376f9c364a90c5a852312a0ceaf (diff)
downloaddjango-885d98d24ac842708347c36644c61fc323c081ec.tar.gz
Fixed #20028 -- Made atomic usable on callable instances.
Thanks Anssi for the report.
Diffstat (limited to 'tests/transactions')
-rw-r--r--tests/transactions/tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/transactions/tests.py b/tests/transactions/tests.py
index e5a608e583..e53a320481 100644
--- a/tests/transactions/tests.py
+++ b/tests/transactions/tests.py
@@ -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):