Add settings class cache invalidation method. Update common.tests.base.BaseTestCase

class to invalidate settings cache. Update tests using Django's TestCase to
BaseTestCase.
This commit is contained in:
Roberto Rosario
2017-01-14 00:13:35 -04:00
parent 53d356d992
commit 4e7559d396
14 changed files with 105 additions and 50 deletions

View File

@@ -1,8 +1,9 @@
from __future__ import unicode_literals
from django.core.files.base import File
from django.test import TestCase, override_settings
from django.test import override_settings
from common.tests import BaseTestCase
from documents.models import DocumentType
from documents.tests import TEST_SMALL_DOCUMENT_PATH, TEST_DOCUMENT_TYPE
from metadata.models import MetadataType, DocumentTypeMetadataType
@@ -16,8 +17,9 @@ from .literals import (
@override_settings(OCR_AUTO_OCR=False)
class IndexTestCase(TestCase):
class IndexTestCase(BaseTestCase):
def setUp(self):
super(IndexTestCase).setUp()
self.document_type = DocumentType.objects.create(
label=TEST_DOCUMENT_TYPE
)
@@ -28,6 +30,7 @@ class IndexTestCase(TestCase):
)
def tearDown(self):
super(IndexTestCase).tearDown()
self.document_type.delete()
def test_indexing(self):