From a4d3a731178d9605401073a7cfa4daf93ab85226 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 5 Jan 2015 03:34:00 -0400 Subject: [PATCH] Use TransactionTestCase to try to avoid exceptions in a test blocking DB access in others --- mayan/apps/ocr/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mayan/apps/ocr/tests.py b/mayan/apps/ocr/tests.py index 1a3c968afe..f375dc32ca 100644 --- a/mayan/apps/ocr/tests.py +++ b/mayan/apps/ocr/tests.py @@ -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)