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>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.test import override_settings
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
@@ -14,7 +13,6 @@ from ..models import AccessControlList
|
||||
from ..permissions import permission_acl_view
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class ACLAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(ACLAPITestCase, self).setUp()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.models import Document, DocumentType
|
||||
@@ -14,7 +13,6 @@ from mayan.apps.documents.tests import (
|
||||
from ..models import AccessControlList
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class PermissionTestCase(BaseTestCase):
|
||||
def setUp(self):
|
||||
super(PermissionTestCase, self).setUp()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.test import override_settings
|
||||
from django.urls import reverse
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
@@ -18,7 +17,6 @@ from ..models import Cabinet
|
||||
from .literals import TEST_CABINET_EDITED_LABEL, TEST_CABINET_LABEL
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class CabinetAPITestCase(DocumentTestMixin, APITestCase):
|
||||
"""
|
||||
Test the cabinet API endpoints
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
@@ -11,7 +10,6 @@ from ..models import Cabinet
|
||||
from .literals import TEST_CABINET_LABEL
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class CabinetTestCase(DocumentTestMixin, BaseTestCase):
|
||||
def test_cabinet_creation(self):
|
||||
cabinet = Cabinet.objects.create(label=TEST_CABINET_LABEL)
|
||||
|
||||
@@ -2,7 +2,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
|
||||
from django.test import override_settings
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.timezone import now
|
||||
|
||||
@@ -18,7 +17,6 @@ from ..permissions import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class CheckoutsAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(CheckoutsAPITestCase, self).setUp()
|
||||
|
||||
@@ -4,7 +4,6 @@ import datetime
|
||||
import logging
|
||||
import time
|
||||
|
||||
from django.test import override_settings
|
||||
from django.utils.timezone import now
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
@@ -18,7 +17,6 @@ from ..exceptions import (
|
||||
from ..models import DocumentCheckout, NewVersionBlock
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentCheckoutTestCase(DocumentTestMixin, BaseTestCase):
|
||||
def test_document_checkout(self):
|
||||
expiration_datetime = now() + datetime.timedelta(days=1)
|
||||
@@ -115,7 +113,6 @@ class DocumentCheckoutTestCase(DocumentTestMixin, BaseTestCase):
|
||||
self.document.new_version(file_object=file_object)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class NewVersionBlockTestCase(DocumentTestMixin, BaseTestCase):
|
||||
def test_blocking(self):
|
||||
NewVersionBlock.objects.block(document=self.document)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from mayan.apps.rest_api.tests import BaseAPITestCase
|
||||
@@ -14,7 +12,6 @@ from ..permissions import (
|
||||
from .literals import TEST_KEY_DATA, TEST_KEY_FINGERPRINT
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class KeyAPITestCase(BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(KeyAPITestCase, self).setUp()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
@@ -16,7 +14,6 @@ from ..permissions import (
|
||||
from .literals import TEST_COMMENT_TEXT
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class CommentAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(CommentAPITestCase, self).setUp()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
@@ -24,7 +23,6 @@ from .literals import (
|
||||
from .mixins import DocumentIndexingTestMixin
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class IndexTestCase(DocumentIndexingTestMixin, DocumentTestMixin, BaseTestCase):
|
||||
def test_document_description_index(self):
|
||||
self._create_index()
|
||||
|
||||
@@ -12,7 +12,6 @@ from ..permissions import permission_content_view
|
||||
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
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
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
|
||||
@@ -10,8 +8,6 @@ from mayan.apps.documents.tests import TEST_HYBRID_DOCUMENT, DocumentTestMixin
|
||||
from .literals import TEST_PARSING_INDEX_NODE_TEMPLATE
|
||||
|
||||
|
||||
@override_settings(DOCUMENT_PARSING_AUTO_PARSING=False)
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class ParsingIndexingTestCase(DocumentTestMixin, BaseTestCase):
|
||||
auto_upload_document = False
|
||||
test_document_filename = TEST_HYBRID_DOCUMENT
|
||||
|
||||
@@ -13,7 +13,6 @@ class DocumentAutoParsingTestCase(GenericDocumentTestCase):
|
||||
test_document_filename = TEST_HYBRID_DOCUMENT
|
||||
auto_create_document_type = False
|
||||
|
||||
@override_settings(DOCUMENT_PARSING_AUTO_PARSING=False)
|
||||
def test_disable_auto_parsing(self):
|
||||
self._create_document_type()
|
||||
self.document = self.upload_document()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.tests import TEST_HYBRID_DOCUMENT, DocumentTestMixin
|
||||
|
||||
@@ -10,7 +8,6 @@ from ..parsers import PopplerParser
|
||||
from .literals import TEST_DOCUMENT_CONTENT
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class ParserTestCase(DocumentTestMixin, BaseTestCase):
|
||||
test_document_filename = TEST_HYBRID_DOCUMENT
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import logging
|
||||
import time
|
||||
|
||||
from django.core.files import File
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.django_gpg.models import Key
|
||||
@@ -26,7 +25,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentSignaturesTestCase(BaseTestCase):
|
||||
def setUp(self):
|
||||
super(DocumentSignaturesTestCase, self).setUp()
|
||||
@@ -254,7 +252,6 @@ class DocumentSignaturesTestCase(BaseTestCase):
|
||||
self.assertEqual(signature.key_id, TEST_KEY_ID)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class EmbeddedSignaturesTestCase(BaseTestCase):
|
||||
def setUp(self):
|
||||
super(EmbeddedSignaturesTestCase, self).setUp()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from mayan.apps.documents.models import DocumentType
|
||||
@@ -28,7 +26,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class WorkflowAPITestCase(BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(WorkflowAPITestCase, self).setUp()
|
||||
@@ -362,7 +359,6 @@ class WorkflowAPITestCase(BaseAPITestCase):
|
||||
self.assertEqual(response.data['results'][0]['label'], self.workflow.label)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class WorkflowStatesAPITestCase(BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(WorkflowStatesAPITestCase, self).setUp()
|
||||
@@ -538,7 +534,6 @@ class WorkflowStatesAPITestCase(BaseAPITestCase):
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class WorkflowTransitionsAPITestCase(BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(WorkflowTransitionsAPITestCase, self).setUp()
|
||||
@@ -774,7 +769,6 @@ class WorkflowTransitionsAPITestCase(BaseAPITestCase):
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentWorkflowsAPITestCase(BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(DocumentWorkflowsAPITestCase, self).setUp()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.document_indexing.models import Index, IndexInstanceNode
|
||||
from mayan.apps.documents.models import DocumentType
|
||||
@@ -20,7 +18,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentStateIndexingTestCase(BaseTestCase):
|
||||
def tearDown(self):
|
||||
self.document_type.delete()
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase, GenericViewTestCase
|
||||
|
||||
from .mixins import DocumentTestMixin
|
||||
|
||||
|
||||
@override_settings(DOCUMENT_PARSING_AUTO_PARSING=False)
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class GenericDocumentTestCase(DocumentTestMixin, BaseTestCase):
|
||||
"""Base test case when testing models or classes"""
|
||||
|
||||
|
||||
@override_settings(DOCUMENT_PARSING_AUTO_PARSING=False)
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class GenericDocumentViewTestCase(DocumentTestMixin, GenericViewTestCase):
|
||||
"""Base test case when testing views"""
|
||||
|
||||
@@ -2,7 +2,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import time
|
||||
|
||||
from django.test import override_settings
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
from django_downloadview import assert_download_response
|
||||
@@ -144,7 +143,6 @@ class DocumentTypeAPITestCase(BaseAPITestCase):
|
||||
self.assertEqual(DocumentType.objects.all().count(), 0)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
@@ -475,7 +473,6 @@ class DocumentAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentPageAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(DocumentPageAPITestCase, self).setUp()
|
||||
@@ -501,7 +498,6 @@ class DocumentPageAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class TrashedDocumentAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ from __future__ import unicode_literals
|
||||
from datetime import timedelta
|
||||
import time
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
|
||||
from ..literals import STUB_EXPIRATION_INTERVAL
|
||||
@@ -23,7 +21,6 @@ from .literals import (
|
||||
from .mixins import DocumentTestMixin
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentTestCase(DocumentTestMixin, BaseTestCase):
|
||||
def test_natural_keys(self):
|
||||
self.document.pages.first().generate_image()
|
||||
@@ -132,7 +129,6 @@ class DocumentTestCase(DocumentTestMixin, BaseTestCase):
|
||||
self.assertEqual(DeletedDocument.objects.count(), 0)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class PDFCompatibilityTestCase(BaseTestCase):
|
||||
def test_indirect_rotate(self):
|
||||
self.document_type = DocumentType.objects.create(
|
||||
@@ -149,7 +145,6 @@ class PDFCompatibilityTestCase(BaseTestCase):
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class OfficeDocumentTestCase(BaseTestCase):
|
||||
def setUp(self):
|
||||
super(OfficeDocumentTestCase, self).setUp()
|
||||
@@ -179,7 +174,6 @@ class OfficeDocumentTestCase(BaseTestCase):
|
||||
self.assertEqual(self.document.page_count, 2)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class MultiPageTiffTestCase(BaseTestCase):
|
||||
def setUp(self):
|
||||
super(MultiPageTiffTestCase, self).setUp()
|
||||
@@ -241,7 +235,6 @@ class DocumentVersionTestCase(GenericDocumentTestCase):
|
||||
self.assertEqual(self.document.versions.count(), 1)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentPassthroughManagerTestCase(BaseTestCase):
|
||||
def setUp(self):
|
||||
super(DocumentPassthroughManagerTestCase, self).setUp()
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.permissions import permission_document_view
|
||||
from mayan.apps.documents.search import document_page_search, document_search
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentSearchTestCase(DocumentTestMixin, BaseTestCase):
|
||||
def _perform_document_page_search(self):
|
||||
return document_page_search.search(
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
from django.urls import reverse
|
||||
|
||||
from rest_framework import status
|
||||
@@ -13,7 +12,6 @@ from mayan.apps.rest_api.tests import BaseAPITestCase
|
||||
from ..classes import SearchModel
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class SearchAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.search import document_search
|
||||
from mayan.apps.documents.tests import (
|
||||
@@ -9,7 +7,6 @@ from mayan.apps.documents.tests import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class DocumentSearchTestCase(DocumentTestMixin, BaseTestCase):
|
||||
auto_upload_document = False
|
||||
test_document_filename = TEST_DOCUMENT_FILENAME
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import GenericViewTestCase
|
||||
from mayan.apps.documents.models import DocumentType
|
||||
from mayan.apps.documents.search import document_search
|
||||
@@ -10,7 +8,6 @@ from mayan.apps.documents.tests import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class Issue46TestCase(GenericViewTestCase):
|
||||
"""
|
||||
Functional tests to make sure issue 46 is fixed
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from mayan.apps.documents.models import DocumentType
|
||||
@@ -27,7 +25,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class SmartLinkAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
auto_create_document_type = False
|
||||
auto_upload_document = False
|
||||
@@ -190,7 +187,6 @@ class SmartLinkAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
self.assertEqual(self.smart_link.label, TEST_SMART_LINK_LABEL_EDITED)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class SmartLinkConditionAPITestCase(BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(SmartLinkConditionAPITestCase, self).setUp()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.documents.tests import GenericDocumentTestCase
|
||||
|
||||
from ..models import SmartLink
|
||||
@@ -9,7 +7,6 @@ from ..models import SmartLink
|
||||
from .literals import TEST_SMART_LINK_DYNAMIC_LABEL, TEST_SMART_LINK_LABEL
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class SmartLinkTestCase(GenericDocumentTestCase):
|
||||
def test_dynamic_label(self):
|
||||
smart_link = SmartLink.objects.create(
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from mayan.apps.documents.models import DocumentType
|
||||
@@ -337,7 +335,6 @@ class DocumentTypeMetadataTypeAPITestCase(BaseAPITestCase):
|
||||
|
||||
|
||||
class DocumentMetadataAPITestCase(BaseAPITestCase):
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
def setUp(self):
|
||||
super(DocumentMetadataAPITestCase, self).setUp()
|
||||
self.login_user()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.models import DocumentType
|
||||
@@ -18,7 +17,6 @@ from .literals import (
|
||||
from .mixins import MetadataTypeTestMixin
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class MetadataTestCase(DocumentTestMixin, MetadataTypeTestMixin, BaseTestCase):
|
||||
def setUp(self):
|
||||
super(MetadataTestCase, self).setUp()
|
||||
|
||||
@@ -4,8 +4,6 @@ import hashlib
|
||||
|
||||
from fuse import FuseOSError
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.models import Document
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
@@ -20,7 +18,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class IndexFilesystemTestCase(DocumentIndexingTestMixin, DocumentTestMixin, BaseTestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from mayan.apps.rest_api.tests import BaseAPITestCase
|
||||
@@ -17,7 +15,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class MOTDAPITestCase(BaseAPITestCase):
|
||||
def setUp(self):
|
||||
super(MOTDAPITestCase, self).setUp()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
@@ -14,8 +12,6 @@ from ..permissions import (
|
||||
TEST_DOCUMENT_CONTENT = 'Mayan EDMS Documentation'
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
@override_settings(DOCUMENT_PARSING_AUTO_PARSING=False)
|
||||
class OCRAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
"""
|
||||
Test the OCR app API endpoints
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
from mayan.apps.document_indexing.models import Index, IndexInstanceNode
|
||||
@@ -12,7 +10,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class OCRIndexingTestCase(DocumentTestMixin, BaseTestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import shutil
|
||||
import mock
|
||||
from pathlib2 import Path
|
||||
|
||||
from django.test import override_settings
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
@@ -32,7 +31,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class CompressedUploadsTestCase(BaseTestCase):
|
||||
def setUp(self):
|
||||
super(CompressedUploadsTestCase, self).setUp()
|
||||
@@ -69,7 +67,6 @@ class CompressedUploadsTestCase(BaseTestCase):
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class EmailFilenameDecodingTestCase(BaseTestCase):
|
||||
def setUp(self):
|
||||
super(EmailFilenameDecodingTestCase, self).setUp()
|
||||
@@ -196,7 +193,6 @@ class EmailFilenameDecodingTestCase(BaseTestCase):
|
||||
self.assertEqual(3, Document.objects.count())
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class POP3SourceTestCase(BaseTestCase):
|
||||
class MockMailbox(object):
|
||||
def dele(self, which):
|
||||
@@ -246,7 +242,6 @@ class POP3SourceTestCase(BaseTestCase):
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class WatchFolderTestCase(DocumentTestMixin, BaseTestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
from rest_framework import status
|
||||
@@ -21,7 +20,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class TagAPITestCase(DocumentTestMixin, BaseAPITestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
from mayan.apps.document_indexing.models import Index, IndexInstanceNode
|
||||
@@ -15,7 +13,6 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class TagSignalIndexingTestCase(DocumentTestMixin, BaseTestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import override_settings
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
|
||||
@@ -10,7 +8,6 @@ from ..models import Tag
|
||||
from .literals import TEST_TAG_COLOR, TEST_TAG_LABEL
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
class TagTestCase(DocumentTestMixin, BaseTestCase):
|
||||
auto_upload_document = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user