Skip to content

Commit 26b4e51

Browse files
committed
Use TransactionTestCase to run on_commit hooks
1 parent 163cca0 commit 26b4e51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

celery_haystack/tests/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from django.core.management import call_command
2-
from django.test import TestCase
2+
from django.test import TransactionTestCase
33

44
from haystack.query import SearchQuerySet
55

66
from .models import Note
77

88

9-
class QueuedSearchIndexTestCase(TestCase):
9+
class QueuedSearchIndexTestCase(TransactionTestCase):
1010

1111
def assertSearchResultLength(self, count):
1212
self.assertEqual(count, len(SearchQuerySet()))

0 commit comments

Comments
 (0)