Files
mayan-edms/mayan/apps/common/tests/base.py
Roberto Rosario 610e10e85a Include django-downloadview's assert_download_response as a
BaseTest member.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-07-01 00:54:21 -04:00

25 lines
718 B
Python

from __future__ import absolute_import, unicode_literals
from django.test import TestCase
from django_downloadview import assert_download_response
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.
"""
assert_download_response = assert_download_response
def setUp(self):
super(BaseTestCase, self).setUp()
Namespace.invalidate_cache_all()
Permission.invalidate_cache()