Files
mayan-edms/mayan/apps/common/tests/base.py
Roberto Rosario 4e7559d396 Add settings class cache invalidation method. Update common.tests.base.BaseTestCase
class to invalidate settings cache. Update tests using Django's TestCase to
BaseTestCase.
2017-01-14 00:13:35 -04:00

22 lines
604 B
Python

from __future__ import absolute_import, unicode_literals
from django.test import TestCase
from permissions.classes import Permission
from smart_settings.classes import Namespace
from .mixins import (
ContentTypeCheckMixin, OpenFileCheckMixin, TempfileCheckMixin
)
class BaseTestCase(ContentTypeCheckMixin, OpenFileCheckMixin, TempfileCheckMixin, TestCase):
"""
This is the most basic test case class any test in the project should use.
"""
def setUp(self):
super(BaseTestCase, self).setUp()
Namespace.invalidate_cache_all()
Permission.invalidate_cache()