diff --git a/tests/regressiontests/test_runner/tests.py b/tests/regressiontests/test_runner/tests.py
index c723f16..3f46465 100644
a
|
b
|
class AutoIncrementResetTest(TransactionTestCase):
|
279 | 279 | def test_autoincrement_reset2(self): |
280 | 280 | p = Person.objects.create(first_name='Jack', last_name='Smith') |
281 | 281 | self.assertEqual(p.pk, 1) |
| 282 | |
| 283 | |
| 284 | class MirrorDeadlockTest(TransactionTestCase): |
| 285 | |
| 286 | def test_teardown_deadlock(self): |
| 287 | # This test only makes sense if your DATABASES setting uses TEST_MIRROR as follows. |
| 288 | from django.conf import settings |
| 289 | default = settings.DATABASES['default'].copy() |
| 290 | mirror = settings.DATABASES['mirror'].copy() |
| 291 | self.assertEqual(default.pop('TEST_MIRROR'), None) |
| 292 | self.assertEqual(mirror.pop('TEST_MIRROR'), 'default') |
| 293 | self.assertEqual(mirror, default) |
| 294 | # A raw SQL query will bypass Django's transaction management and leave a pending transaction. |
| 295 | db.connections['default'].cursor().execute('INSERT INTO test_runner_person (first_name, last_name) VALUES ("Adrian", "Holovaty")') |
| 296 | db.connections['mirror'].cursor().execute('INSERT INTO test_runner_person (first_name, last_name) VALUES ("Jacob", "Kaplan-Moss")') |