From 3d0f1393649a0ea89f85d55bdc9fa65459c3e61e Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 28 Oct 2019 03:35:16 -0400 Subject: [PATCH] Fix failing user management test mixin import Signed-off-by: Roberto Rosario --- mayan/apps/user_management/tests/mixins.py | 4 ++-- mayan/apps/user_management/tests/test_api.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mayan/apps/user_management/tests/mixins.py b/mayan/apps/user_management/tests/mixins.py index 548df197e8..6e41c3e79e 100644 --- a/mayan/apps/user_management/tests/mixins.py +++ b/mayan/apps/user_management/tests/mixins.py @@ -12,7 +12,7 @@ from .literals import ( ) -class GroupAPITestMixin(object): +class GroupAPIViewTestMixin(object): def _request_test_group_create_api_view(self): result = self.post( viewname='rest_api:group-list', data={ @@ -91,7 +91,7 @@ class GroupViewTestMixin(object): ) -class UserAPITestMixin(object): +class UserAPIViewTestMixin(object): def _request_test_user_create_api_view(self): result = self.post( viewname='rest_api:user-list', data={ diff --git a/mayan/apps/user_management/tests/test_api.py b/mayan/apps/user_management/tests/test_api.py index 7ae2d4a947..d0985e0f1a 100644 --- a/mayan/apps/user_management/tests/test_api.py +++ b/mayan/apps/user_management/tests/test_api.py @@ -14,10 +14,10 @@ from ..permissions import ( permission_user_edit, permission_user_view ) -from .mixins import GroupAPITestMixin, GroupTestMixin, UserAPITestMixin +from .mixins import GroupAPIViewTestMixin, GroupTestMixin, UserAPIViewTestMixin -class GroupAPITestCase(GroupAPITestMixin, GroupTestMixin, BaseAPITestCase): +class GroupAPITestCase(GroupAPIViewTestMixin, GroupTestMixin, BaseAPITestCase): def test_group_create_no_permission(self): group_count = Group.objects.count() @@ -111,7 +111,7 @@ class GroupAPITestCase(GroupAPITestMixin, GroupTestMixin, BaseAPITestCase): self.assertNotEqual(self.test_group.name, group_name) -class UserAPITestCase(UserAPITestMixin, BaseAPITestCase): +class UserAPITestCase(UserAPIViewTestMixin, BaseAPITestCase): def test_user_create_api_view_no_permission(self): user_count = get_user_model().objects.count() @@ -200,7 +200,7 @@ class UserAPITestCase(UserAPITestMixin, BaseAPITestCase): self.assertNotEqual(self.test_user.username, user_username) -class UserGroupAPITestCase(GroupTestMixin, UserAPITestMixin, BaseAPITestCase): +class UserGroupAPITestCase(GroupTestMixin, UserAPIViewTestMixin, BaseAPITestCase): def test_user_create_with_group_api_view_no_permission(self): self._create_test_group()