Tests: Turn on parsing and OCR
The base test file now turns off OCR, parsing and file metadata processing. Apps that rely on those must now turn them on explicitly. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -13,6 +13,7 @@ TEST_DOCUMENT_CONTENT = 'Sample text'
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
@override_settings(DOCUMENT_PARSING_AUTO_PARSING=True)
|
||||
class DocumentParsingAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
test_document_filename = TEST_HYBRID_DOCUMENT
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.models import DocumentType
|
||||
from mayan.apps.documents.runtime import language_choices
|
||||
@@ -14,6 +16,7 @@ TEST_DOCUMENT_CONTENT_DEU_1 = 'Repository für elektronische Dokumente.'
|
||||
TEST_DOCUMENT_CONTENT_DEU_2 = 'Es bietet einen'
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=True)
|
||||
class DocumentOCRTestCase(DocumentTestMixin, BaseTestCase):
|
||||
# PyOCR's leak descriptor in get_available_languages and image_to_string
|
||||
# Disable descriptor leak test until fixed in upstream
|
||||
@@ -24,6 +27,7 @@ class DocumentOCRTestCase(DocumentTestMixin, BaseTestCase):
|
||||
self.assertTrue(TEST_DOCUMENT_CONTENT in content)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=True)
|
||||
class GermanOCRSupportTestCase(BaseTestCase):
|
||||
# PyOCR's leak descriptor in get_available_languages and image_to_string
|
||||
# Disable descriptor leak test until fixed in upstream
|
||||
|
||||
Reference in New Issue
Block a user