Files
mayan-edms/mayan/apps/rest_api/tests/base.py
Roberto Rosario 80f64d7fcf Add BaseAPITestCase class that invalidates the permission and smart settings caches.
Use BaseAPITestCase for all API test cases.
2017-02-16 21:12:55 -04:00

18 lines
463 B
Python

from __future__ import absolute_import, unicode_literals
from rest_framework.test import APITestCase
from permissions.classes import Permission
from smart_settings.classes import Namespace
class BaseAPITestCase(APITestCase):
"""
API test case class that invalidates permissions and smart settings
"""
def setUp(self):
super(BaseAPITestCase, self).setUp()
Namespace.invalidate_cache_all()
Permission.invalidate_cache()