summaryrefslogtreecommitdiff
path: root/tests/transactions
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2016-11-25 13:07:57 +0100
committerTim Graham <timograham@gmail.com>2016-11-25 07:07:57 -0500
commitd391b3a85ba1166dd6c3d0c3005344ce93f22bef (patch)
tree73de162badaf30cc5208729b6e15bf848a0abcdf /tests/transactions
parent9a49fdcd8f176d033dd2602825a2103ff7273af4 (diff)
Refs #16682 -- Replaced signal number with equivalent signal.SIGINT.
Diffstat (limited to 'tests/transactions')
-rw-r--r--tests/transactions/tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/transactions/tests.py b/tests/transactions/tests.py
index b3fdc7f915..7dc21cca4f 100644
--- a/tests/transactions/tests.py
+++ b/tests/transactions/tests.py
@@ -1,6 +1,7 @@
from __future__ import unicode_literals
import os
+import signal
import sys
import threading
import time
@@ -225,8 +226,8 @@ class AtomicTests(TransactionTestCase):
with transaction.atomic():
Reporter.objects.create(first_name='Tintin')
# Send SIGINT (simulate Ctrl-C). One call isn't enough.
- os.kill(os.getpid(), 2)
- os.kill(os.getpid(), 2)
+ os.kill(os.getpid(), signal.SIGINT)
+ os.kill(os.getpid(), signal.SIGINT)
except KeyboardInterrupt:
pass
self.assertEqual(Reporter.objects.all().count(), 0)