From 55b692aede0b679f53081d822a60f6c0f24ed58d Mon Sep 17 00:00:00 2001 From: Jawayria Date: Wed, 17 Feb 2021 16:55:13 +0500 Subject: [PATCH] refactor: Removed unused imports Removed unused imports from openedx/core/djangoapps/{api_admin, catalog, ccxcon, certificates} --- .../commands/tests/test_create_api_access_request.py | 2 -- .../commands/tests/test_create_catalog_integrations.py | 2 -- openedx/core/djangoapps/catalog/utils.py | 1 - openedx/core/djangoapps/certificates/api.py | 1 - openedx/core/djangoapps/certificates/tests/test_api.py | 5 ++--- 5 files changed, 2 insertions(+), 9 deletions(-) diff --git a/openedx/core/djangoapps/api_admin/management/commands/tests/test_create_api_access_request.py b/openedx/core/djangoapps/api_admin/management/commands/tests/test_create_api_access_request.py index d6e1e223f9..a4fbbbac8a 100644 --- a/openedx/core/djangoapps/api_admin/management/commands/tests/test_create_api_access_request.py +++ b/openedx/core/djangoapps/api_admin/management/commands/tests/test_create_api_access_request.py @@ -7,8 +7,6 @@ from django.contrib.sites.models import Site from django.core.management import call_command from django.core.management.base import CommandError from django.test import TestCase - -from openedx.core.djangoapps.api_admin.management.commands import create_api_access_request from openedx.core.djangoapps.api_admin.models import ApiAccessConfig, ApiAccessRequest from common.djangoapps.student.tests.factories import UserFactory diff --git a/openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py b/openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py index cda7c66196..72591bf92d 100644 --- a/openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py +++ b/openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py @@ -1,9 +1,7 @@ """ Test cases for catalog_integrations command. """ - import pytest -from django.test import TestCase # lint-amnesty, pylint: disable=unused-import from django.core.management import call_command, CommandError from openedx.core.djangolib.testing.utils import CacheIsolationTestCase diff --git a/openedx/core/djangoapps/catalog/utils.py b/openedx/core/djangoapps/catalog/utils.py index 41a725c6ce..cff1ca7df7 100644 --- a/openedx/core/djangoapps/catalog/utils.py +++ b/openedx/core/djangoapps/catalog/utils.py @@ -14,7 +14,6 @@ from opaque_keys.edx.keys import CourseKey from pytz import UTC from common.djangoapps.entitlements.utils import is_course_run_entitlement_fulfillable -from openedx.core.constants import COURSE_PUBLISHED # lint-amnesty, pylint: disable=unused-import from openedx.core.djangoapps.catalog.cache import ( COURSE_PROGRAMS_CACHE_KEY_TPL, CATALOG_COURSE_PROGRAMS_CACHE_KEY_TPL, diff --git a/openedx/core/djangoapps/certificates/api.py b/openedx/core/djangoapps/certificates/api.py index 285fb9d94d..fd6ea63a46 100644 --- a/openedx/core/djangoapps/certificates/api.py +++ b/openedx/core/djangoapps/certificates/api.py @@ -5,7 +5,6 @@ The public API for certificates. import logging from datetime import datetime - from pytz import UTC from lms.djangoapps.certificates.models import CertificateStatuses, CertificateWhitelist diff --git a/openedx/core/djangoapps/certificates/tests/test_api.py b/openedx/core/djangoapps/certificates/tests/test_api.py index 7a5c27caeb..755486bbd1 100644 --- a/openedx/core/djangoapps/certificates/tests/test_api.py +++ b/openedx/core/djangoapps/certificates/tests/test_api.py @@ -1,10 +1,9 @@ -import itertools + from contextlib import contextmanager -from datetime import datetime, timedelta +from datetime import datetime import ddt import pytz -import waffle from django.test import TestCase from edx_toggles.toggles import LegacyWaffleSwitch from edx_toggles.toggles.testutils import override_waffle_switch