Skip to content

Commit

Permalink
chore: rename test classes
Browse files Browse the repository at this point in the history
Change-Id: I5d120c90a6d483a82ecfe4dae903d68646cbbca4
  • Loading branch information
Guillaume-sousa committed Apr 19, 2023
1 parent d1a6607 commit 20f5f11
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
22 changes: 10 additions & 12 deletions tests/components/curate_data_structure/tests_int_access_control.py
Expand Up @@ -3,7 +3,7 @@
from django.contrib.auth.models import AnonymousUser
from core_main_app.access_control.exceptions import AccessControlError
from core_main_app.utils.integration_tests.integration_base_test_case import (
MongoIntegrationBaseTestCase,
IntegrationBaseTestCase,
)
from core_main_app.utils.tests_tools.MockUser import create_mock_user
from core_parser_app.components.data_structure.models import (
Expand All @@ -22,7 +22,7 @@
fixture_data_structure = DataStructureFixtures()


class TestCurateDataStructureGetById(MongoIntegrationBaseTestCase):
class TestCurateDataStructureGetById(IntegrationBaseTestCase):
"""
Test Curate Data Structure Get ById
"""
Expand Down Expand Up @@ -87,7 +87,7 @@ def test_get_by_id_as_anonymous_user_raises_error(self):
)


class TestCurateDataStructureGetAll(MongoIntegrationBaseTestCase):
class TestCurateDataStructureGetAll(IntegrationBaseTestCase):
"""
Test Curate Data Structure Get All
"""
Expand Down Expand Up @@ -130,7 +130,7 @@ def test_get_all_as_anonymous_user_raises_error(self):


class TestCurateDataStructureGetAllExceptUserIdWithNoData(
MongoIntegrationBaseTestCase
IntegrationBaseTestCase
):
"""
Test Curate Data Structure Get All Except User Id With No Data
Expand Down Expand Up @@ -193,7 +193,7 @@ def test_get_all_except_user_id_with_no_data_as_anonymous_user_raises_error(
)


class TestCurateDataStructureDelete(MongoIntegrationBaseTestCase):
class TestCurateDataStructureDelete(IntegrationBaseTestCase):
"""
Test Curate Data Structure Delete
"""
Expand Down Expand Up @@ -252,9 +252,7 @@ def test_delete_others_data_structure_as_anonymous_user_raises_error(self):
curate_data_structure_api.delete(data_structure, AnonymousUser())


class TestCurateDataStructureUpdateDataStructureRoot(
MongoIntegrationBaseTestCase
):
class TestCurateDataStructureUpdateDataStructureRoot(IntegrationBaseTestCase):
"""
Test Curate Data Structure Update Data Structure Root
"""
Expand Down Expand Up @@ -341,7 +339,7 @@ def test_update_others_data_structure_root_as_anonymous_user_raises_error(
)


class TestCurateDataStructureCreateOrUpdate(MongoIntegrationBaseTestCase):
class TestCurateDataStructureCreateOrUpdate(IntegrationBaseTestCase):
"""
Test Curate Data Structure Create Or Update
"""
Expand Down Expand Up @@ -408,7 +406,7 @@ def test_upsert_data_structure_as_anonymous_user_raises_error(self):
curate_data_structure_api.upsert(data_structure, AnonymousUser())


class TestCurateDataStructureGetAllWithNoData(MongoIntegrationBaseTestCase):
class TestCurateDataStructureGetAllWithNoData(IntegrationBaseTestCase):
"""
Test Curate Data Structure Get All With No Data
"""
Expand Down Expand Up @@ -453,7 +451,7 @@ def test_get_all_with_no_data_as_anonymous_user_raises_error(self):
curate_data_structure_api.get_all_with_no_data(AnonymousUser())


class TestCurateDataStructureGetByDataId(MongoIntegrationBaseTestCase):
class TestCurateDataStructureGetByDataId(IntegrationBaseTestCase):
"""
Test Curate Data Structure Get ById
"""
Expand Down Expand Up @@ -519,7 +517,7 @@ def test_get_by_data_id_as_anonymous_user_raises_error(self):
)


class TestDataStructureChangeOwner(MongoIntegrationBaseTestCase):
class TestDataStructureChangeOwner(IntegrationBaseTestCase):
"""
Test Data Structure Change Owner
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/rest/curate_data_structure/tests_int.py
Expand Up @@ -3,7 +3,7 @@

from rest_framework import status
from core_main_app.utils.integration_tests.integration_base_test_case import (
MongoIntegrationBaseTestCase,
IntegrationBaseTestCase,
)

from core_main_app.utils.tests_tools.MockUser import create_mock_user
Expand All @@ -19,7 +19,7 @@
fixture_data_structure = DataStructureFixtures()


class TestDataStructureListAdmin(MongoIntegrationBaseTestCase):
class TestDataStructureListAdmin(IntegrationBaseTestCase):
"""
Test Data Structure List Admin
"""
Expand Down Expand Up @@ -118,7 +118,7 @@ def test_post_data_structure_missing_field_returns_http_400(self):
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)


class TestDataStructureList(MongoIntegrationBaseTestCase):
class TestDataStructureList(IntegrationBaseTestCase):
"""
Test Data Structure List
"""
Expand Down Expand Up @@ -233,7 +233,7 @@ def test_post_data_structure_missing_field_returns_http_400(self):
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)


class TestDataStructureDetail(MongoIntegrationBaseTestCase):
class TestDataStructureDetail(IntegrationBaseTestCase):
"""
Test Data Structure Detail
"""
Expand Down
6 changes: 3 additions & 3 deletions tests/views/tests_int_access_control.py
Expand Up @@ -12,14 +12,14 @@
from core_curate_app.views.common.views import DraftContentEditor
from core_curate_app.views.user import ajax as curate_ajax
from core_main_app.utils.integration_tests.integration_base_test_case import (
MongoIntegrationBaseTestCase,
IntegrationBaseTestCase,
)
from core_main_app.utils.tests_tools.MockUser import create_mock_user

fixture_data_structure = DataStructureFixtures()


class TestDraftContentEditorView(MongoIntegrationBaseTestCase):
class TestDraftContentEditorView(IntegrationBaseTestCase):
"""Test Draft Content Editor View"""

def setUp(self):
Expand Down Expand Up @@ -176,7 +176,7 @@ def test_user_save_xml_content_returns_error(self):
self.assertEqual(response.status_code, 400)


class TestStartCuratePost(MongoIntegrationBaseTestCase):
class TestStartCuratePost(IntegrationBaseTestCase):
"""Test Start Curate Post"""

def setUp(self):
Expand Down

0 comments on commit 20f5f11

Please sign in to comment.