Invalidate the layer cache in tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -5,6 +5,7 @@ from django.test import TestCase
|
||||
from django_downloadview import assert_download_response
|
||||
|
||||
from mayan.apps.acls.tests.mixins import ACLTestCaseMixin
|
||||
from mayan.apps.converter.tests.mixins import LayerTestCaseMixin
|
||||
from mayan.apps.permissions.classes import Permission
|
||||
from mayan.apps.smart_settings.classes import Namespace
|
||||
from mayan.apps.user_management.tests.mixins import UserTestMixin
|
||||
@@ -19,7 +20,7 @@ from .mixins import (
|
||||
|
||||
|
||||
class BaseTestCase(
|
||||
SilenceLoggerTestCaseMixin, ConnectionsCheckTestCaseMixin,
|
||||
LayerTestCaseMixin, SilenceLoggerTestCaseMixin, ConnectionsCheckTestCaseMixin,
|
||||
RandomPrimaryKeyModelMonkeyPatchMixin, ACLTestCaseMixin,
|
||||
ModelTestCaseMixin, OpenFileCheckTestCaseMixin,
|
||||
TempfileCheckTestCasekMixin, UserTestMixin, TestCase
|
||||
|
||||
@@ -14,6 +14,12 @@ from .literals import (
|
||||
)
|
||||
|
||||
|
||||
class LayerTestCaseMixin(object):
|
||||
def setUp(self):
|
||||
super(LayerTestCaseMixin, self).setUp()
|
||||
Layer.invalidate_cache()
|
||||
|
||||
|
||||
class LayerTestMixin(PermissionTestMixin):
|
||||
test_layer = Layer(
|
||||
label='Test layer', name='test_layer', order=1000,
|
||||
@@ -38,8 +44,6 @@ class LayerTestMixin(PermissionTestMixin):
|
||||
'select': self.test_layer_permission,
|
||||
'view': self.test_layer_permission,
|
||||
}
|
||||
Layer.invalidate_cache()
|
||||
Layer.update()
|
||||
|
||||
|
||||
class TransformationTestMixin(LayerTestMixin):
|
||||
|
||||
Reference in New Issue
Block a user