diff --git a/tests/regressiontests/transactions_regress/tests.py b/tests/regressiontests/transactions_regress/tests.py
index 22f1b0f..90aa123 100644
a
|
b
|
from __future__ import absolute_import
|
3 | 3 | from django.core.exceptions import ImproperlyConfigured |
4 | 4 | from django.db import connection, transaction |
5 | 5 | from django.db.transaction import commit_on_success, commit_manually, TransactionManagementError |
| 6 | from django.db.utils import DatabaseError |
6 | 7 | from django.test import TransactionTestCase, skipUnlessDBFeature |
| 8 | from django.test.utils import override_settings |
7 | 9 | from django.utils.unittest import skipIf |
8 | 10 | |
9 | 11 | from .models import Mod, M2mA, M2mB |
… |
… |
class TestTransactionClosing(TransactionTestCase):
|
166 | 168 | except: |
167 | 169 | self.fail("A transaction consisting of a failed operation was not closed.") |
168 | 170 | |
| 171 | # Same test with DebugCursor |
| 172 | with override_settings(DEBUG=True): |
| 173 | self.assertRaises(Exception, create_system_user) |
| 174 | try: |
| 175 | self.assertEqual(User.objects.count(), 1) |
| 176 | except DatabaseError: |
| 177 | self.fail("A transaction consisting of a failed operation was not closed.") |
| 178 | |
169 | 179 | |
170 | 180 | class TestManyToManyAddTransaction(TransactionTestCase): |
171 | 181 | def test_manyrelated_add_commit(self): |