Use TransactionTestCase to try to avoid exceptions in a test blocking DB access in others
This commit is contained in:
@@ -2,7 +2,7 @@ from __future__ import absolute_import
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.files.base import File
|
||||
from django.test import TestCase
|
||||
from django.test import TransactionTestCase
|
||||
|
||||
from documents.models import Document, DocumentType
|
||||
from documents.tests import TEST_SMALL_DOCUMENT_PATH, TEST_DOCUMENT_TYPE
|
||||
@@ -11,7 +11,7 @@ from .api import do_document_ocr
|
||||
from .models import DocumentQueue, QueueDocument
|
||||
|
||||
|
||||
class DocumentOCRTestCase(TestCase):
|
||||
class DocumentOCRTestCase(TransactionTestCase):
|
||||
def setUp(self):
|
||||
self.document_type = DocumentType.objects.create(name=TEST_DOCUMENT_TYPE, ocr=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user