diff options
Diffstat (limited to 'tests/transaction_hooks/tests.py')
| -rw-r--r-- | tests/transaction_hooks/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/transaction_hooks/tests.py b/tests/transaction_hooks/tests.py index 049211139d..ed3cf18be2 100644 --- a/tests/transaction_hooks/tests.py +++ b/tests/transaction_hooks/tests.py @@ -214,7 +214,8 @@ class TestConnectionOnCommit(TransactionTestCase): try: connection.set_autocommit(False) - with self.assertRaises(transaction.TransactionManagementError): + msg = 'on_commit() cannot be used in manual transaction management' + with self.assertRaisesMessage(transaction.TransactionManagementError, msg): transaction.on_commit(should_never_be_called) finally: connection.set_autocommit(True) |
