Skip to content

Commit 88b370f

Browse files
use TransactionTestCase in tests
1 parent 0e10dc9 commit 88b370f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

django_cron/tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
from datetime import timedelta
44

55
from django import db
6-
from django.test import TestCase as BaseTestCase
6+
7+
from django.test import TransactionTestCase
78
from django.core.management import call_command
89
from django.test.utils import override_settings
910
from django.test.client import Client
@@ -33,7 +34,7 @@ def str_content(self):
3334
return self._str_cache
3435

3536

36-
class TestCase(BaseTestCase):
37+
class TestCase(TransactionTestCase):
3738

3839
success_cron = 'test_crons.TestSucessCronJob'
3940
error_cron = 'test_crons.TestErrorCronJob'

0 commit comments

Comments
 (0)