diff --git a/tests/regressiontests/transactions_regress/tests.py b/tests/regressiontests/transactions_regress/tests.py
index 5972263..615446f 100644
|
a
|
b
|
|
| 1 | 1 | from __future__ import absolute_import |
| | 2 | import os |
| 2 | 3 | |
| 3 | 4 | from django.core.exceptions import ImproperlyConfigured |
| 4 | 5 | from django.db import connection, transaction |
| … |
… |
class TestTransactionClosing(TransactionTestCase):
|
| 174 | 175 | """ |
| 175 | 176 | self.test_failing_query_transaction_closed() |
| 176 | 177 | |
| | 178 | def test_rollback_on_keyboardinterrupt(self): |
| | 179 | try: |
| | 180 | with transaction.commit_on_success(): |
| | 181 | Mod.objects.create(fld=17624) |
| | 182 | # Send SIGINT (simulate Ctrl-C) to self, one call seems not enough?? |
| | 183 | os.kill(os.getpid(), 2) |
| | 184 | os.kill(os.getpid(), 2) |
| | 185 | except KeyboardInterrupt: |
| | 186 | pass |
| | 187 | self.assertEqual(Mod.objects.all().count(), 0) |
| | 188 | |
| 177 | 189 | |
| 178 | 190 | class TestManyToManyAddTransaction(TransactionTestCase): |
| 179 | 191 | def test_manyrelated_add_commit(self): |