Remove unused imports
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import step, world
|
||||
from lettuce import world
|
||||
from cms.djangoapps.contentstore.features.common import press_the_notification_button, type_in_codemirror
|
||||
|
||||
KEY_CSS = '.key h3.title'
|
||||
|
||||
@@ -42,7 +42,6 @@ from xmodule.services import SettingsService
|
||||
from xmodule.studio_editable import has_author_view
|
||||
from xmodule.util.xmodule_django import add_webpack_to_fragment
|
||||
from xmodule.x_module import AUTHOR_VIEW, PREVIEW_VIEWS, STUDENT_VIEW, ModuleSystem, XModule, XModuleDescriptor
|
||||
import webpack_loader.utils
|
||||
|
||||
from .helpers import render_from_lms
|
||||
from .session_kv_store import SessionKeyValueStore
|
||||
|
||||
@@ -33,8 +33,6 @@ from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace
|
||||
from student.auth import has_course_author_access
|
||||
from student.roles import CourseStaffRole, GlobalStaff, LibraryUserRole
|
||||
from student.tests.factories import UserFactory
|
||||
from util.date_utils import get_default_time_display
|
||||
from xmodule.modulestore import ModuleStoreEnum
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, LibraryFactory, check_mongo_calls
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Views related to the transcript preferences feature
|
||||
"""
|
||||
import os
|
||||
import json
|
||||
import logging
|
||||
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
@@ -30,14 +30,10 @@ from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError
|
||||
from xmodule.video_module.transcripts_utils import (
|
||||
clean_video_id,
|
||||
copy_or_rename_transcript,
|
||||
download_youtube_subs,
|
||||
GetTranscriptsFromYouTubeException,
|
||||
get_video_transcript_content,
|
||||
generate_subs_from_source,
|
||||
get_transcript_for_video,
|
||||
get_transcripts_from_youtube,
|
||||
remove_subs_from_store,
|
||||
Transcript,
|
||||
TranscriptsRequestValidationException,
|
||||
TranscriptsGenerationException,
|
||||
|
||||
@@ -4,12 +4,9 @@ Defines a form for providing validation of LTI consumer course-specific configur
|
||||
import logging
|
||||
|
||||
from django import forms
|
||||
from opaque_keys import InvalidKeyError
|
||||
from opaque_keys.edx.locator import CourseLocator
|
||||
|
||||
from openedx.core.lib.courses import clean_course_id
|
||||
from xblock_config.models import CourseEditLTIFieldsEnabledFlag
|
||||
from xmodule.modulestore.django import modulestore
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
"""
|
||||
Tests for third_party_auth decorators.
|
||||
"""
|
||||
import json
|
||||
import unittest
|
||||
|
||||
import ddt
|
||||
from django.conf import settings
|
||||
from django.http import HttpResponse, JsonResponse
|
||||
from django.http import HttpResponse
|
||||
from django.test import RequestFactory
|
||||
from mock import MagicMock
|
||||
|
||||
from six.moves.urllib.parse import urlencode
|
||||
from third_party_auth.decorators import xframe_allow_whitelisted
|
||||
from third_party_auth.tests.testutil import TestCase
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"""
|
||||
End-to-end tests for the LMS.
|
||||
"""
|
||||
import urllib
|
||||
from datetime import datetime, timedelta
|
||||
from textwrap import dedent
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ from ...fixtures.course import CourseFixture, XBlockFixtureDesc
|
||||
from ...pages.common.auto_auth import AutoAuthPage
|
||||
from ...pages.common.logout import LogoutPage
|
||||
from ...pages.lms.course_home import CourseHomePage
|
||||
from ...pages.lms.courseware import CoursewarePage, CoursewareSequentialTabPage, RenderXBlockPage
|
||||
from ...pages.lms.courseware import CoursewarePage, CoursewareSequentialTabPage
|
||||
from ...pages.lms.create_mode import ModeCreationPage
|
||||
from ...pages.lms.dashboard import DashboardPage
|
||||
from ...pages.lms.pay_and_verify import FakePaymentPage, FakeSoftwareSecureVerificationPage, PaymentAndVerificationFlow
|
||||
|
||||
@@ -6,9 +6,7 @@ from textwrap import dedent
|
||||
|
||||
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc
|
||||
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
|
||||
from common.test.acceptance.pages.lms.course_home import CourseHomePage
|
||||
from common.test.acceptance.pages.lms.courseware import CoursewarePage
|
||||
from common.test.acceptance.pages.lms.problem import ProblemPage
|
||||
from common.test.acceptance.tests.helpers import UniqueCourseTest
|
||||
|
||||
|
||||
|
||||
@@ -2,16 +2,11 @@
|
||||
Acceptance tests for Home Page (My Courses / My Libraries).
|
||||
"""
|
||||
import datetime
|
||||
from uuid import uuid4
|
||||
|
||||
from opaque_keys.edx.locator import LibraryLocator
|
||||
|
||||
from base_studio_test import StudioCourseTest
|
||||
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
|
||||
from common.test.acceptance.pages.lms.account_settings import AccountSettingsPage
|
||||
from common.test.acceptance.pages.studio.index import DashboardPage
|
||||
from common.test.acceptance.pages.studio.library import LibraryEditPage
|
||||
from common.test.acceptance.pages.studio.overview import CourseOutlinePage
|
||||
from common.test.acceptance.tests.helpers import AcceptanceTest, get_selected_option_text, select_option_by_text
|
||||
|
||||
|
||||
|
||||
@@ -5,13 +5,9 @@ import logging
|
||||
|
||||
from django import forms
|
||||
from django.core.exceptions import ValidationError
|
||||
from opaque_keys import InvalidKeyError
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from six import text_type
|
||||
|
||||
from bulk_email.models import COURSE_EMAIL_MESSAGE_BODY_TAG, CourseAuthorization, CourseEmailTemplate
|
||||
from openedx.core.lib.courses import clean_course_id
|
||||
from xmodule.modulestore.django import modulestore
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Tests for the Certificate REST APIs.
|
||||
"""
|
||||
# pylint: disable=missing-docstring
|
||||
from itertools import product
|
||||
import ddt
|
||||
|
||||
from django.urls import reverse
|
||||
@@ -15,7 +14,6 @@ from course_modes.models import CourseMode
|
||||
from lms.djangoapps.certificates.apis.v0.views import CertificatesDetailView
|
||||
from lms.djangoapps.certificates.models import CertificateStatuses
|
||||
from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory
|
||||
from openedx.core.djangoapps.oauth_dispatch.toggles import ENFORCE_JWT_SCOPES
|
||||
from openedx.core.djangoapps.user_authn.tests.utils import AuthType, AuthAndScopesTestMixin
|
||||
from student.tests.factories import UserFactory
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
|
||||
|
||||
@@ -4,9 +4,7 @@ defined in edx_user_state_client.
|
||||
"""
|
||||
|
||||
from collections import defaultdict
|
||||
from unittest import skip
|
||||
|
||||
from django.test import TestCase
|
||||
from edx_user_state_client.tests import UserStateClientTestBase
|
||||
|
||||
from courseware.tests.factories import UserFactory
|
||||
|
||||
@@ -45,7 +45,7 @@ from xmodule.modulestore.inheritance import own_metadata
|
||||
from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_MODULESTORE, TEST_DATA_SPLIT_MODULESTORE
|
||||
from xmodule.tests.test_import import DummySystem
|
||||
from xmodule.tests.test_video import VideoDescriptorTestBase, instantiate_descriptor
|
||||
from xmodule.video_module import VideoDescriptor, bumper_utils, rewrite_video_url, video_utils
|
||||
from xmodule.video_module import VideoDescriptor, bumper_utils, video_utils
|
||||
from xmodule.video_module.transcripts_utils import Transcript, save_to_store, subs_filename
|
||||
from xmodule.video_module.video_module import (
|
||||
EXPORT_IMPORT_COURSE_DIR,
|
||||
|
||||
@@ -12,7 +12,6 @@ from django.contrib.auth.models import User
|
||||
from django.contrib.sites.models import Site
|
||||
|
||||
from celery_utils.logged_task import LoggedTask
|
||||
from django_comment_common.utils import set_course_discussion_settings
|
||||
from django_comment_common.models import DiscussionsIdMapping
|
||||
from edx_ace import ace
|
||||
from edx_ace.utils import date
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Discussion API views
|
||||
"""
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.contrib.auth import get_user_model
|
||||
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from rest_framework import permissions
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
API for the gating djangoapp
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
@@ -4,13 +4,9 @@ Defines a form for providing validation of subsection grade templates.
|
||||
import logging
|
||||
|
||||
from django import forms
|
||||
from opaque_keys import InvalidKeyError
|
||||
from opaque_keys.edx.locator import CourseLocator
|
||||
from six import text_type
|
||||
|
||||
from lms.djangoapps.grades.config.models import CoursePersistentGradesFlag
|
||||
from openedx.core.lib.courses import clean_course_id
|
||||
from xmodule.modulestore.django import modulestore
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ from openedx.core.djangoapps.catalog.tests.factories import (
|
||||
)
|
||||
from openedx.core.djangoapps.catalog.tests.mixins import CatalogIntegrationMixin
|
||||
from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin
|
||||
from openedx.core.djangoapps.waffle_utils.testutils import override_waffle_flag
|
||||
from openedx.core.djangolib.testing.utils import skip_unless_lms
|
||||
from student.tests.factories import CourseEnrollmentFactory, UserFactory
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
|
||||
|
||||
@@ -6,7 +6,6 @@ only displayed at the course level. This is because it makes it a lot easier to
|
||||
optimize and reason about, and it avoids having to tackle the bigger problem of
|
||||
general XBlock representation in this rather specialized formatting.
|
||||
"""
|
||||
import os
|
||||
from functools import partial
|
||||
|
||||
from django.http import Http404, HttpResponse
|
||||
@@ -17,12 +16,7 @@ from rest_framework.response import Response
|
||||
from mobile_api.models import MobileApiConfig
|
||||
from xmodule.exceptions import NotFoundError
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.video_module.transcripts_utils import (
|
||||
convert_video_transcript,
|
||||
get_video_transcript_content,
|
||||
Transcript,
|
||||
get_transcript,
|
||||
)
|
||||
from xmodule.video_module.transcripts_utils import get_transcript
|
||||
|
||||
from ..decorators import mobile_course_access, mobile_view
|
||||
from .serializers import BlockOutline, video_summary
|
||||
|
||||
@@ -7,7 +7,7 @@ from django.http import Http404
|
||||
from django.test import TestCase
|
||||
from django.test.client import RequestFactory
|
||||
from django.test.utils import override_settings
|
||||
from mock import Mock, patch
|
||||
from mock import patch
|
||||
|
||||
from notification_prefs import NOTIFICATION_PREF_KEY
|
||||
from notification_prefs.views import UsernameCipher, ajax_disable, ajax_enable, ajax_status, set_subscription
|
||||
|
||||
@@ -11,7 +11,6 @@ from courseware.access import has_access
|
||||
from courseware.courses import get_course_with_access
|
||||
from edxmako.shortcuts import render_to_response
|
||||
from static_replace import replace_static_urls
|
||||
from xmodule.annotator_token import retrieve_token
|
||||
|
||||
|
||||
@login_required
|
||||
|
||||
@@ -20,7 +20,7 @@ from course_modes.tests.factories import CourseModeFactory
|
||||
from lms.djangoapps.verify_student.models import VerificationDeadline
|
||||
from student.models import ENROLLED_TO_ENROLLED, CourseEnrollment, ManualEnrollmentAudit
|
||||
from student.roles import GlobalStaff, SupportStaffRole
|
||||
from student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory
|
||||
from student.tests.factories import CourseEnrollmentFactory, UserFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from django.utils.decorators import method_decorator
|
||||
from django.views.generic import View
|
||||
|
||||
from edxmako.shortcuts import render_to_response
|
||||
from entitlements.models import CourseEntitlement, CourseEntitlementSupportDetail
|
||||
from entitlements.models import CourseEntitlementSupportDetail
|
||||
from lms.djangoapps.commerce.utils import EcommerceService
|
||||
from lms.djangoapps.support.decorators import require_support_permission
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.generic import View
|
||||
from rest_framework.generics import GenericAPIView
|
||||
from rest_framework.response import Response
|
||||
|
||||
from edxmako.shortcuts import render_to_response
|
||||
from lms.djangoapps.support.decorators import require_support_permission
|
||||
|
||||
@@ -19,8 +19,6 @@ from django.http import HttpResponseRedirect
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.generic.edit import FormView
|
||||
from opaque_keys import InvalidKeyError
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
|
||||
from openedx.core.lib.courses import clean_course_id
|
||||
from student.models import CourseEnrollment
|
||||
|
||||
@@ -21,8 +21,6 @@ import requests
|
||||
import six
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.contenttypes.fields import GenericForeignKey
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.cache import cache
|
||||
from django.core.files.base import ContentFile
|
||||
from django.urls import reverse
|
||||
@@ -33,7 +31,6 @@ from django.utils.translation import ugettext_lazy
|
||||
from model_utils import Choices
|
||||
from model_utils.models import StatusModel, TimeStampedModel
|
||||
from opaque_keys.edx.django.models import CourseKeyField
|
||||
from openedx.core.djangolib.model_mixins import DeletableByUserValue
|
||||
|
||||
from lms.djangoapps.verify_student.ssencrypt import (
|
||||
encrypt_and_encode,
|
||||
|
||||
@@ -8,11 +8,6 @@ import logging
|
||||
import pytz
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.mail import send_mail
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from edxmako.shortcuts import render_to_string
|
||||
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
|
||||
from sailthru import SailthruClient
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -3,7 +3,7 @@ Mixins to facilitate testing OAuth connections to Django-OAuth-Toolkit or
|
||||
Django-OAuth2-Provider.
|
||||
"""
|
||||
|
||||
from unittest import skip, expectedFailure
|
||||
from unittest import expectedFailure
|
||||
from django.test.client import RequestFactory
|
||||
|
||||
from openedx.core.djangoapps.oauth_dispatch import adapters
|
||||
|
||||
@@ -17,9 +17,7 @@ from django.http import HttpResponse
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from oauth2_provider import models as dot_models
|
||||
from oauth2_provider.settings import oauth2_settings
|
||||
from oauth2_provider.views.base import TokenView as DOTAccessTokenView
|
||||
from oauthlib.oauth2.rfc6749.tokens import BearerToken
|
||||
from provider import constants
|
||||
from provider import scope as dop_scope
|
||||
from provider.oauth2.views import AccessTokenView as DOPAccessTokenView
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
"""Tests covering utilities for integrating with the catalog service."""
|
||||
# pylint: disable=missing-docstring
|
||||
import copy
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
import ddt
|
||||
import mock
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.core.cache import cache
|
||||
|
||||
@@ -5,7 +5,6 @@ import logging
|
||||
import uuid
|
||||
|
||||
import pycountry
|
||||
from django.conf import settings
|
||||
from django.core.cache import cache
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from edx_rest_api_client.client import EdxRestApiClient
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
Django Rest Framework Authentication classes for cross-domain end-points.
|
||||
"""
|
||||
import django
|
||||
from django.middleware.csrf import CsrfViewMiddleware
|
||||
from rest_framework import authentication
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from courseware import courses
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.validators import validate_email
|
||||
from django.db import IntegrityError, transaction
|
||||
from django.db import IntegrityError
|
||||
from django.db.models.signals import m2m_changed, post_save
|
||||
from django.dispatch import receiver
|
||||
from django.http import Http404
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""Helper functions for working with Credentials."""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from edx_rest_api_client.client import EdxRestApiClient
|
||||
|
||||
from openedx.core.djangoapps.credentials.models import CredentialsApiConfig
|
||||
|
||||
@@ -5,9 +5,7 @@ import fnmatch
|
||||
import functools
|
||||
import json
|
||||
import logging
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
import unicodedata
|
||||
import urllib
|
||||
from textwrap import dedent
|
||||
|
||||
@@ -7,7 +7,6 @@ import mock
|
||||
|
||||
import ddt
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
from django.test.client import RequestFactory
|
||||
from django.http import HttpResponse
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
""" OAuth related Python apis. """
|
||||
import json
|
||||
from django.conf import settings
|
||||
|
||||
from oauthlib.oauth2.rfc6749.errors import OAuth2Error
|
||||
from oauthlib.oauth2.rfc6749.tokens import BearerToken
|
||||
|
||||
@@ -9,7 +9,7 @@ import ddt
|
||||
import httpretty
|
||||
from django.conf import settings
|
||||
from django.urls import reverse
|
||||
from django.test import RequestFactory, TestCase, override_settings
|
||||
from django.test import RequestFactory, TestCase
|
||||
from mock import call, patch
|
||||
|
||||
from Cryptodome.PublicKey import RSA
|
||||
|
||||
@@ -30,10 +30,7 @@ from openedx.core.djangoapps.catalog.tests.factories import (
|
||||
SeatFactory,
|
||||
generate_course_run_key
|
||||
)
|
||||
from openedx.core.djangoapps.programs import (
|
||||
PROGRAMS_WAFFLE_SWITCH_NAMESPACE,
|
||||
ALWAYS_CALCULATE_PROGRAM_PRICE_AS_ANONYMOUS_USER
|
||||
)
|
||||
from openedx.core.djangoapps.programs import ALWAYS_CALCULATE_PROGRAM_PRICE_AS_ANONYMOUS_USER
|
||||
from openedx.core.djangoapps.programs.tests.factories import ProgressFactory
|
||||
from openedx.core.djangoapps.programs.utils import (
|
||||
DEFAULT_ENROLLMENT_START_DATE,
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
"""
|
||||
Theming aware template loaders.
|
||||
"""
|
||||
from django.core.exceptions import SuspiciousFileOperation
|
||||
from django.template.loaders.filesystem import Loader as FilesystemLoader
|
||||
from django.utils._os import safe_join
|
||||
|
||||
from edxmako.makoloader import MakoLoader
|
||||
from openedx.core.djangoapps.theming.helpers import get_all_theme_template_dirs, get_current_request, get_current_theme
|
||||
|
||||
@@ -5,7 +5,6 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
||||
import ddt
|
||||
from django.test import TestCase
|
||||
from django.test.utils import override_settings
|
||||
from mock import patch
|
||||
|
||||
from completion import models
|
||||
from completion.test_utils import CompletionWaffleTestMixin
|
||||
|
||||
@@ -21,27 +21,8 @@ from openedx.core.djangoapps.user_api.accounts import ACCOUNT_VISIBILITY_PREF_KE
|
||||
from openedx.core.djangoapps.user_api.models import UserPreference
|
||||
from openedx.core.djangoapps.user_api.preferences.api import set_user_preference
|
||||
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms
|
||||
from student.models import (
|
||||
CourseEnrollment,
|
||||
CourseEnrollmentAllowed,
|
||||
ManualEnrollmentAudit,
|
||||
PasswordHistory,
|
||||
PendingEmailChange,
|
||||
PendingNameChange,
|
||||
Registration,
|
||||
SocialLink,
|
||||
UserProfile,
|
||||
get_retired_username_by_username,
|
||||
)
|
||||
from student.tests.factories import (
|
||||
TEST_PASSWORD,
|
||||
ContentTypeFactory,
|
||||
CourseEnrollmentAllowedFactory,
|
||||
PendingEmailChangeFactory,
|
||||
PermissionFactory,
|
||||
SuperuserFactory,
|
||||
UserFactory
|
||||
)
|
||||
from student.models import PendingEmailChange, UserProfile
|
||||
from student.tests.factories import TEST_PASSWORD, UserFactory
|
||||
|
||||
from .. import ALL_USERS_VISIBILITY, PRIVATE_VISIBILITY
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import string
|
||||
from urlparse import urlparse
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext as _
|
||||
from six import text_type
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ from edxmako.shortcuts import marketing_link
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
|
||||
from openedx.core.djangoapps.user_api.helpers import FormDescription
|
||||
from openedx.core.lib.mobile_utils import is_request_from_mobile_app
|
||||
from openedx.features.enterprise_support.api import enterprise_customer_for_request
|
||||
from student.forms import get_registration_extension_form
|
||||
from student.models import UserProfile
|
||||
|
||||
@@ -8,7 +8,6 @@ from time import sleep
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.db import transaction
|
||||
from django.db.models import Q, Max
|
||||
|
||||
from openedx.core.djangoapps.dark_lang.models import DarkLangConfig
|
||||
|
||||
@@ -4,7 +4,7 @@ Django ORM model specifications for the User API application
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.validators import RegexValidator
|
||||
from django.db import models
|
||||
from django.db.models.signals import post_delete, post_save, pre_delete, pre_save
|
||||
from django.db.models.signals import post_delete, post_save, pre_save
|
||||
from django.dispatch import receiver
|
||||
from model_utils.models import TimeStampedModel
|
||||
from opaque_keys.edx.django.models import CourseKeyField
|
||||
|
||||
@@ -20,7 +20,6 @@ from six import text_type
|
||||
from social_django.models import UserSocialAuth, Partial
|
||||
|
||||
from django_comment_common import models
|
||||
from openedx.core.djangoapps.user_api.models import UserRetirementStatus
|
||||
from openedx.core.djangoapps.site_configuration.helpers import get_value
|
||||
from openedx.core.lib.api.test_utils import ApiTestCase, TEST_API_KEY
|
||||
from openedx.core.lib.time_zone_utils import get_display_time_zone
|
||||
|
||||
@@ -4,15 +4,12 @@ Defines a form for providing validation of HLS Playback course-specific configur
|
||||
import logging
|
||||
|
||||
from django import forms
|
||||
from opaque_keys import InvalidKeyError
|
||||
from opaque_keys.edx.locator import CourseLocator
|
||||
|
||||
from openedx.core.djangoapps.video_config.models import (
|
||||
CourseHLSPlaybackEnabledFlag,
|
||||
CourseVideoTranscriptEnabledFlag,
|
||||
)
|
||||
from openedx.core.lib.courses import clean_course_id
|
||||
from xmodule.modulestore.django import modulestore
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
Utils for video_pipeline app.
|
||||
"""
|
||||
from django.conf import settings
|
||||
from edx_rest_api_client.client import EdxRestApiClient
|
||||
|
||||
from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_for_user
|
||||
|
||||
@@ -6,7 +6,6 @@ import django.utils.timezone
|
||||
from oauth2_provider import models as dot_models
|
||||
from provider.oauth2 import models as dop_models
|
||||
from rest_framework.exceptions import AuthenticationFailed
|
||||
from rest_framework.authentication import SessionAuthentication
|
||||
from rest_framework_oauth.authentication import OAuth2Authentication
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""Get log settings."""
|
||||
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
@@ -21,7 +21,6 @@ from gating import api as lms_gating_api
|
||||
from lms.djangoapps.course_api.blocks.transformers.milestones import MilestonesAndSpecialExamsTransformer
|
||||
from milestones.tests.utils import MilestonesTestCaseMixin
|
||||
from opaque_keys.edx.keys import CourseKey, UsageKey
|
||||
from openedx.core.djangoapps.site_configuration.models import SiteConfiguration
|
||||
from openedx.core.lib.gating import api as gating_api
|
||||
from openedx.features.course_experience.views.course_outline import (
|
||||
CourseOutlineFragmentView, DEFAULT_COMPLETION_TRACKING_START
|
||||
|
||||
@@ -8,7 +8,7 @@ from django.template.loader import render_to_string
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.views.decorators.cache import cache_control
|
||||
from django.views.decorators.csrf import ensure_csrf_cookie
|
||||
from opaque_keys.edx.keys import CourseKey, UsageKey
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from web_fragments.fragment import Fragment
|
||||
|
||||
from course_modes.models import get_cosmetic_verified_display_price
|
||||
|
||||
@@ -3,14 +3,14 @@ View logic for handling course welcome messages.
|
||||
"""
|
||||
|
||||
from django.urls import reverse
|
||||
from django.http import HttpResponse, HttpResponseBadRequest
|
||||
from django.http import HttpResponse
|
||||
from django.template.loader import render_to_string
|
||||
from django.views.decorators.csrf import ensure_csrf_cookie
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from web_fragments.fragment import Fragment
|
||||
|
||||
from course_updates import get_ordered_updates
|
||||
from courseware.courses import get_course_info_section_module, get_course_with_access
|
||||
from courseware.courses import get_course_with_access
|
||||
from openedx.core.djangoapps.plugin_api.views import EdxFragmentView
|
||||
from openedx.core.djangoapps.user_api.course_tag.api import set_course_tag, get_course_tag
|
||||
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# TODO: LEARNER-3854: Implement tests or remove file after Learner Analytics test.
|
||||
|
||||
@@ -29,7 +29,6 @@ from lms.djangoapps.commerce.utils import EcommerceService
|
||||
from lms.djangoapps.courseware.courses import get_course_with_access
|
||||
from lms.djangoapps.discussion.views import create_user_profile_context
|
||||
from lms.djangoapps.grades.course_grade_factory import CourseGradeFactory
|
||||
from lms.lib.comment_client.utils import CommentClient500Error
|
||||
from openedx.features.course_experience import default_course_url_name
|
||||
from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_image_urls_for_user
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ from django.conf import settings
|
||||
from django.urls import reverse
|
||||
from django.test.client import RequestFactory
|
||||
from opaque_keys.edx.locator import CourseLocator
|
||||
from openedx.core.djangoapps.waffle_utils.testutils import override_waffle_flag
|
||||
from openedx.features.learner_profile.views.learner_profile import learner_profile_context
|
||||
from student.tests.factories import CourseEnrollmentFactory, UserFactory
|
||||
from util.testing import UrlResetMixin
|
||||
|
||||
@@ -7,8 +7,6 @@ import tempfile
|
||||
import textwrap
|
||||
import unittest
|
||||
|
||||
import paver.easy
|
||||
import paver.tasks
|
||||
from ddt import ddt, file_data, data, unpack
|
||||
from mock import MagicMock, mock_open, patch
|
||||
from path import Path as path
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import os
|
||||
from unittest import TestCase
|
||||
|
||||
import paver.easy
|
||||
from paver import tasks
|
||||
from paver.easy import BuildFailure
|
||||
|
||||
|
||||
Reference in New Issue
Block a user