Separate tests again, TestCase encloses the entire test into a single transaction, an error block all other DB access in the test

This commit is contained in:
Roberto Rosario
2015-01-05 03:23:16 -04:00
parent 47529185cc
commit 0b2fe39526

View File

@@ -11,7 +11,7 @@ from .api import do_document_ocr
from .models import DocumentQueue, QueueDocument
class DocumentSearchTestCase(TestCase):
class DocumentOCRTestCase(TestCase):
def setUp(self):
self.document_type = DocumentType.objects.create(name=TEST_DOCUMENT_TYPE, ocr=False)
@@ -39,10 +39,16 @@ class DocumentSearchTestCase(TestCase):
# Make sure content was extracted
self.assertTrue(result in self.document.pages.first().content)
def test_ocr_language_backends(self):
def test_ocr_language_backends_deu(self):
self._test_ocr_language_issue_16('deu', 'Mayan EDMS')
def test_ocr_language_backends_end(self):
self._test_ocr_language_issue_16('eng', 'Mayan EDMS')
def test_ocr_language_backends_spa(self):
self._test_ocr_language_issue_16('spa', 'Mayan EDMS')
def test_ocr_language_backends_rus(self):
self._test_ocr_language_issue_16('rus', '')
def tearDown(self):