From f99a6f71df53fc9e1b3a3968c9ed4937e0fb1483 Mon Sep 17 00:00:00 2001 From: Bryann Valderrama <64033729+BryanttV@users.noreply.github.com> Date: Wed, 18 Sep 2024 08:21:41 -0500 Subject: [PATCH] chore: move unit tests to corresponding unit folder (#279) --- eox_core/api/support/v1/tests/unit/__init__.py | 0 .../api/support/v1/tests/{ => unit}/test_oauth_applications.py | 0 eox_core/api/support/v1/tests/{ => unit}/test_permissions.py | 0 eox_core/api/support/v1/tests/{ => unit}/test_users.py | 0 eox_core/api/task_dispatcher/tests/unit/__init__.py | 0 eox_core/api/task_dispatcher/tests/{ => unit}/test_views.py | 0 eox_core/api/v1/tests/unit/__init__.py | 0 eox_core/api/v1/tests/{ => unit}/test_coursekey.py | 2 +- eox_core/api/v1/tests/{ => unit}/test_enrollments.py | 0 eox_core/api/v1/tests/{ => unit}/test_grades.py | 0 eox_core/api/v1/tests/{ => unit}/test_permissions.py | 2 +- eox_core/api/v1/tests/{ => unit}/test_pre_enrollments.py | 0 eox_core/api/v1/tests/{ => unit}/test_users.py | 0 eox_core/tests/unit/__init__.py | 0 eox_core/tests/{ => unit}/test_middleware.py | 0 eox_core/tests/{ => unit}/test_models.py | 0 eox_core/tests/{ => unit}/test_pipeline.py | 0 eox_core/tests/{ => unit}/test_storage.py | 0 eox_core/tests/{ => unit}/test_utils.py | 0 eox_core/tests/{ => unit}/test_views.py | 3 +-- eox_core/tests/{ => unit}/test_wrappers.py | 0 21 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 eox_core/api/support/v1/tests/unit/__init__.py rename eox_core/api/support/v1/tests/{ => unit}/test_oauth_applications.py (100%) rename eox_core/api/support/v1/tests/{ => unit}/test_permissions.py (100%) rename eox_core/api/support/v1/tests/{ => unit}/test_users.py (100%) create mode 100644 eox_core/api/task_dispatcher/tests/unit/__init__.py rename eox_core/api/task_dispatcher/tests/{ => unit}/test_views.py (100%) create mode 100644 eox_core/api/v1/tests/unit/__init__.py rename eox_core/api/v1/tests/{ => unit}/test_coursekey.py (97%) rename eox_core/api/v1/tests/{ => unit}/test_enrollments.py (100%) rename eox_core/api/v1/tests/{ => unit}/test_grades.py (100%) rename eox_core/api/v1/tests/{ => unit}/test_permissions.py (97%) rename eox_core/api/v1/tests/{ => unit}/test_pre_enrollments.py (100%) rename eox_core/api/v1/tests/{ => unit}/test_users.py (100%) create mode 100644 eox_core/tests/unit/__init__.py rename eox_core/tests/{ => unit}/test_middleware.py (100%) rename eox_core/tests/{ => unit}/test_models.py (100%) rename eox_core/tests/{ => unit}/test_pipeline.py (100%) rename eox_core/tests/{ => unit}/test_storage.py (100%) rename eox_core/tests/{ => unit}/test_utils.py (100%) rename eox_core/tests/{ => unit}/test_views.py (96%) rename eox_core/tests/{ => unit}/test_wrappers.py (100%) diff --git a/eox_core/api/support/v1/tests/unit/__init__.py b/eox_core/api/support/v1/tests/unit/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/eox_core/api/support/v1/tests/test_oauth_applications.py b/eox_core/api/support/v1/tests/unit/test_oauth_applications.py similarity index 100% rename from eox_core/api/support/v1/tests/test_oauth_applications.py rename to eox_core/api/support/v1/tests/unit/test_oauth_applications.py diff --git a/eox_core/api/support/v1/tests/test_permissions.py b/eox_core/api/support/v1/tests/unit/test_permissions.py similarity index 100% rename from eox_core/api/support/v1/tests/test_permissions.py rename to eox_core/api/support/v1/tests/unit/test_permissions.py diff --git a/eox_core/api/support/v1/tests/test_users.py b/eox_core/api/support/v1/tests/unit/test_users.py similarity index 100% rename from eox_core/api/support/v1/tests/test_users.py rename to eox_core/api/support/v1/tests/unit/test_users.py diff --git a/eox_core/api/task_dispatcher/tests/unit/__init__.py b/eox_core/api/task_dispatcher/tests/unit/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/eox_core/api/task_dispatcher/tests/test_views.py b/eox_core/api/task_dispatcher/tests/unit/test_views.py similarity index 100% rename from eox_core/api/task_dispatcher/tests/test_views.py rename to eox_core/api/task_dispatcher/tests/unit/test_views.py diff --git a/eox_core/api/v1/tests/unit/__init__.py b/eox_core/api/v1/tests/unit/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/eox_core/api/v1/tests/test_coursekey.py b/eox_core/api/v1/tests/unit/test_coursekey.py similarity index 97% rename from eox_core/api/v1/tests/test_coursekey.py rename to eox_core/api/v1/tests/unit/test_coursekey.py index 7627c9e9e..dbb620750 100644 --- a/eox_core/api/v1/tests/test_coursekey.py +++ b/eox_core/api/v1/tests/unit/test_coursekey.py @@ -7,7 +7,7 @@ from mock import patch from rest_framework.serializers import ValidationError -from ..serializers import EdxappCourseEnrollmentSerializer +from eox_core.api.v1.serializers import EdxappCourseEnrollmentSerializer class CourseKeyValidationTest(TestCase): diff --git a/eox_core/api/v1/tests/test_enrollments.py b/eox_core/api/v1/tests/unit/test_enrollments.py similarity index 100% rename from eox_core/api/v1/tests/test_enrollments.py rename to eox_core/api/v1/tests/unit/test_enrollments.py diff --git a/eox_core/api/v1/tests/test_grades.py b/eox_core/api/v1/tests/unit/test_grades.py similarity index 100% rename from eox_core/api/v1/tests/test_grades.py rename to eox_core/api/v1/tests/unit/test_grades.py diff --git a/eox_core/api/v1/tests/test_permissions.py b/eox_core/api/v1/tests/unit/test_permissions.py similarity index 97% rename from eox_core/api/v1/tests/test_permissions.py rename to eox_core/api/v1/tests/unit/test_permissions.py index 96a151d10..b9ff0cbd6 100644 --- a/eox_core/api/v1/tests/test_permissions.py +++ b/eox_core/api/v1/tests/unit/test_permissions.py @@ -7,7 +7,7 @@ from mock import MagicMock from rest_framework.exceptions import NotAuthenticated -from ..permissions import EoxCoreAPIPermission +from eox_core.api.v1.permissions import EoxCoreAPIPermission class PermissionsTest(TestCase): diff --git a/eox_core/api/v1/tests/test_pre_enrollments.py b/eox_core/api/v1/tests/unit/test_pre_enrollments.py similarity index 100% rename from eox_core/api/v1/tests/test_pre_enrollments.py rename to eox_core/api/v1/tests/unit/test_pre_enrollments.py diff --git a/eox_core/api/v1/tests/test_users.py b/eox_core/api/v1/tests/unit/test_users.py similarity index 100% rename from eox_core/api/v1/tests/test_users.py rename to eox_core/api/v1/tests/unit/test_users.py diff --git a/eox_core/tests/unit/__init__.py b/eox_core/tests/unit/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/eox_core/tests/test_middleware.py b/eox_core/tests/unit/test_middleware.py similarity index 100% rename from eox_core/tests/test_middleware.py rename to eox_core/tests/unit/test_middleware.py diff --git a/eox_core/tests/test_models.py b/eox_core/tests/unit/test_models.py similarity index 100% rename from eox_core/tests/test_models.py rename to eox_core/tests/unit/test_models.py diff --git a/eox_core/tests/test_pipeline.py b/eox_core/tests/unit/test_pipeline.py similarity index 100% rename from eox_core/tests/test_pipeline.py rename to eox_core/tests/unit/test_pipeline.py diff --git a/eox_core/tests/test_storage.py b/eox_core/tests/unit/test_storage.py similarity index 100% rename from eox_core/tests/test_storage.py rename to eox_core/tests/unit/test_storage.py diff --git a/eox_core/tests/test_utils.py b/eox_core/tests/unit/test_utils.py similarity index 100% rename from eox_core/tests/test_utils.py rename to eox_core/tests/unit/test_utils.py diff --git a/eox_core/tests/test_views.py b/eox_core/tests/unit/test_views.py similarity index 96% rename from eox_core/tests/test_views.py rename to eox_core/tests/unit/test_views.py index f2ac3d857..ca7a03d3f 100644 --- a/eox_core/tests/test_views.py +++ b/eox_core/tests/unit/test_views.py @@ -7,8 +7,7 @@ import eox_core from eox_core.api.v1.views import UserInfo - -from ..test_utils import SuperUserFactory +from eox_core.test_utils import SuperUserFactory JSON_CONTENT_TYPE = 'application/json' diff --git a/eox_core/tests/test_wrappers.py b/eox_core/tests/unit/test_wrappers.py similarity index 100% rename from eox_core/tests/test_wrappers.py rename to eox_core/tests/unit/test_wrappers.py