From 3b496a041a0e5517fab318299544cc43506dbe32 Mon Sep 17 00:00:00 2001 From: Prashant Makwana Date: Tue, 22 Oct 2024 15:32:59 +0000 Subject: [PATCH] chore: lint fix --- .../apps/api/v2/tests/test_views.py | 26 +------------------ enterprise_catalog/apps/api/v2/urls.py | 1 + ...enterprise_catalog_get_content_metadata.py | 4 ++- .../apps/catalog/tests/test_utils.py | 5 +--- 4 files changed, 6 insertions(+), 30 deletions(-) diff --git a/enterprise_catalog/apps/api/v2/tests/test_views.py b/enterprise_catalog/apps/api/v2/tests/test_views.py index 9ec17fbe..c2f0eba6 100644 --- a/enterprise_catalog/apps/api/v2/tests/test_views.py +++ b/enterprise_catalog/apps/api/v2/tests/test_views.py @@ -1,41 +1,17 @@ -import json -import json -import uuid from datetime import datetime -from typing import final from unittest import mock import ddt import pytz -from django.conf import settings -from django.utils.text import slugify from rest_framework import status from rest_framework.reverse import reverse -from rest_framework.settings import api_settings -from six.moves.urllib.parse import quote_plus from enterprise_catalog.apps.api.v1.tests.mixins import APITestMixin -from enterprise_catalog.apps.api.v1.utils import is_any_course_run_active -from enterprise_catalog.apps.catalog.constants import ( - COURSE, - COURSE_RUN, - EXEC_ED_2U_COURSE_TYPE, - LEARNER_PATHWAY, - PROGRAM, -) -from enterprise_catalog.apps.catalog.models import ( - ContentMetadata, -) +from enterprise_catalog.apps.catalog.models import ContentMetadata from enterprise_catalog.apps.catalog.tests import test_utils from enterprise_catalog.apps.catalog.tests.factories import ( - ContentMetadataFactory, EnterpriseCatalogFactory, ) -from enterprise_catalog.apps.catalog.utils import ( - enterprise_proxy_login_url, - get_content_key, - get_parent_content_key, -) @ddt.ddt diff --git a/enterprise_catalog/apps/api/v2/urls.py b/enterprise_catalog/apps/api/v2/urls.py index e2f13ca2..0a6350cd 100644 --- a/enterprise_catalog/apps/api/v2/urls.py +++ b/enterprise_catalog/apps/api/v2/urls.py @@ -8,6 +8,7 @@ EnterpriseCatalogGetContentMetadataV2, ) + app_name = 'v2' router = DefaultRouter() diff --git a/enterprise_catalog/apps/api/v2/views/enterprise_catalog_get_content_metadata.py b/enterprise_catalog/apps/api/v2/views/enterprise_catalog_get_content_metadata.py index 66b73098..8b05d306 100644 --- a/enterprise_catalog/apps/api/v2/views/enterprise_catalog_get_content_metadata.py +++ b/enterprise_catalog/apps/api/v2/views/enterprise_catalog_get_content_metadata.py @@ -1,4 +1,6 @@ -from enterprise_catalog.apps.api.v1.views.enterprise_catalog_get_content_metadata import EnterpriseCatalogGetContentMetadata +from enterprise_catalog.apps.api.v1.views.enterprise_catalog_get_content_metadata import ( + EnterpriseCatalogGetContentMetadata, +) class EnterpriseCatalogGetContentMetadataV2(EnterpriseCatalogGetContentMetadata): diff --git a/enterprise_catalog/apps/catalog/tests/test_utils.py b/enterprise_catalog/apps/catalog/tests/test_utils.py index a37ec8b3..1d9db07c 100644 --- a/enterprise_catalog/apps/catalog/tests/test_utils.py +++ b/enterprise_catalog/apps/catalog/tests/test_utils.py @@ -1,9 +1,6 @@ """ Test Util for catalog models. """ -from enterprise_catalog.apps.catalog.constants import ( - COURSE, - COURSE_RUN, -) +from enterprise_catalog.apps.catalog.constants import COURSE, COURSE_RUN from enterprise_catalog.apps.catalog.tests import factories