diff --git a/common/djangoapps/course_modes/api/v1/tests/test_views.py b/common/djangoapps/course_modes/api/v1/tests/test_views.py index e6d2ec1a2a..6b94189972 100644 --- a/common/djangoapps/course_modes/api/v1/tests/test_views.py +++ b/common/djangoapps/course_modes/api/v1/tests/test_views.py @@ -3,9 +3,9 @@ Tests for the course modes API. """ from __future__ import absolute_import, unicode_literals -from itertools import product import json import unittest +from itertools import product import ddt from django.conf import settings @@ -20,7 +20,7 @@ from course_modes.models import CourseMode from course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.oauth_dispatch.toggles import ENFORCE_JWT_SCOPES -from openedx.core.djangoapps.user_authn.tests.utils import AuthAndScopesTestMixin, AuthType, JWT_AUTH_TYPES +from openedx.core.djangoapps.user_authn.tests.utils import JWT_AUTH_TYPES, AuthAndScopesTestMixin, AuthType from student.tests.factories import UserFactory diff --git a/common/djangoapps/course_modes/api/v1/urls.py b/common/djangoapps/course_modes/api/v1/urls.py index c660c788f2..1e28b19535 100644 --- a/common/djangoapps/course_modes/api/v1/urls.py +++ b/common/djangoapps/course_modes/api/v1/urls.py @@ -2,12 +2,12 @@ URL definitions for the course_modes v1 API. """ from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url from course_modes.api.v1 import views - app_name = 'v1' urlpatterns = [ diff --git a/common/djangoapps/course_modes/api/v1/views.py b/common/djangoapps/course_modes/api/v1/views.py index 5c61496f92..42a19d6121 100644 --- a/common/djangoapps/course_modes/api/v1/views.py +++ b/common/djangoapps/course_modes/api/v1/views.py @@ -3,6 +3,7 @@ Defines the "ReSTful" API for course modes. """ from __future__ import absolute_import + import logging from django.shortcuts import get_object_or_404 @@ -14,11 +15,10 @@ from rest_framework import status from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response -from openedx.core.lib.api.authentication import OAuth2AuthenticationAllowInactiveUser -from openedx.core.lib.api.parsers import MergePatchParser - from course_modes.api.serializers import CourseModeSerializer from course_modes.models import CourseMode +from openedx.core.lib.api.authentication import OAuth2AuthenticationAllowInactiveUser +from openedx.core.lib.api.parsers import MergePatchParser log = logging.getLogger(__name__) diff --git a/common/djangoapps/course_modes/tests/test_signals.py b/common/djangoapps/course_modes/tests/test_signals.py index b3675e4f3c..71ce637634 100644 --- a/common/djangoapps/course_modes/tests/test_signals.py +++ b/common/djangoapps/course_modes/tests/test_signals.py @@ -6,12 +6,12 @@ from __future__ import absolute_import, unicode_literals from datetime import datetime, timedelta import ddt +from django.conf import settings from mock import patch from pytz import UTC from course_modes.models import CourseMode from course_modes.signals import _listen_for_course_publish -from django.conf import settings from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory