From 0c312b343e51b3fafc0b84fa634d98dbbbb8fefb Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 15 Mar 2019 03:04:17 -0400 Subject: [PATCH] Unify BaseAPITestCase with GenericViewTestCase Make BaseAPITestCase a subclass of GenericViewTestCase. Signed-off-by: Roberto Rosario --- mayan/apps/rest_api/tests/base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mayan/apps/rest_api/tests/base.py b/mayan/apps/rest_api/tests/base.py index 1a7de24fd1..5cae2cb46e 100644 --- a/mayan/apps/rest_api/tests/base.py +++ b/mayan/apps/rest_api/tests/base.py @@ -2,17 +2,17 @@ from __future__ import absolute_import, unicode_literals from rest_framework.test import APITestCase -from mayan.apps.acls.tests.mixins import ACLTestCaseMixin -from mayan.apps.common.tests.mixins import ClientMethodsTestCaseMixin +from mayan.apps.common.tests import GenericViewTestCase from mayan.apps.permissions.classes import Permission from mayan.apps.smart_settings.classes import Namespace -from mayan.apps.user_management.tests.mixins import UserTestCaseMixin -class BaseAPITestCase(ClientMethodsTestCaseMixin, ACLTestCaseMixin, UserTestCaseMixin, APITestCase): +class BaseAPITestCase(APITestCase, GenericViewTestCase): """ API test case class that invalidates permissions and smart settings """ + expected_content_type = 'application/json' + def setUp(self): super(BaseAPITestCase, self).setUp() Namespace.invalidate_cache_all()