diff --git a/cms/djangoapps/maintenance/tests.py b/cms/djangoapps/maintenance/tests.py index db8a4261d6c..51f776b00af 100644 --- a/cms/djangoapps/maintenance/tests.py +++ b/cms/djangoapps/maintenance/tests.py @@ -3,20 +3,15 @@ """ -import json - import ddt from django.conf import settings from django.urls import reverse -from cms.djangoapps.contentstore.management.commands.utils import get_course_versions from common.djangoapps.student.tests.factories import AdminFactory, UserFactory from openedx.features.announcements.models import Announcement -from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order -from xmodule.modulestore.tests.factories import CourseFactory, BlockFactory # lint-amnesty, pylint: disable=wrong-import-order -from .views import COURSE_KEY_ERROR_MESSAGES, MAINTENANCE_VIEWS +from .views import MAINTENANCE_VIEWS # This list contains URLs of all maintenance app views. MAINTENANCE_URLS = [reverse(view['url']) for view in MAINTENANCE_VIEWS.values()] diff --git a/cms/djangoapps/maintenance/views.py b/cms/djangoapps/maintenance/views.py index 7448a972f32..1ec0f9c5cff 100644 --- a/cms/djangoapps/maintenance/views.py +++ b/cms/djangoapps/maintenance/views.py @@ -6,17 +6,14 @@ import logging from django.core.validators import ValidationError -from django.db import transaction from django.urls import reverse, reverse_lazy from django.utils.decorators import method_decorator from django.utils.translation import gettext as _ from django.views.generic import View from django.views.generic.edit import CreateView, DeleteView, UpdateView from django.views.generic.list import ListView -from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from cms.djangoapps.contentstore.management.commands.utils import get_course_versions from common.djangoapps.edxmako.shortcuts import render_to_response from common.djangoapps.util.json_request import JsonResponse from common.djangoapps.util.views import require_global_staff