Files
mayan-edms/mayan/apps/document_parsing/tests/test_indexing.py
Roberto Rosario 34443a715c Tests: Remove unused override_settings
Now that the automatic OCR, parsing and file metadata processing
are turned off by the test setting file, these overrides in the
tests are not needed anymore.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 03:12:42 -04:00

34 lines
1.1 KiB
Python

from __future__ import unicode_literals
from mayan.apps.common.tests import BaseTestCase
from mayan.apps.document_indexing.models import Index, IndexInstanceNode
from mayan.apps.document_indexing.tests.literals import TEST_INDEX_LABEL
from mayan.apps.documents.tests import TEST_HYBRID_DOCUMENT, DocumentTestMixin
from .literals import TEST_PARSING_INDEX_NODE_TEMPLATE
class ParsingIndexingTestCase(DocumentTestMixin, BaseTestCase):
auto_upload_document = False
test_document_filename = TEST_HYBRID_DOCUMENT
def test_parsing_indexing(self):
index = Index.objects.create(label=TEST_INDEX_LABEL)
index.document_types.add(self.document_type)
root = index.template_root
index.node_templates.create(
parent=root, expression=TEST_PARSING_INDEX_NODE_TEMPLATE,
link_documents=True
)
self.document = self.upload_document()
self.document.submit_for_parsing()
self.assertTrue(
self.document in IndexInstanceNode.objects.get(
value='sample'
).documents.all()
)