chore: Applied lint-amnesty on lms/djangoapps (#29394)
This commit is contained in:
@@ -16,12 +16,12 @@ from common.djangoapps.student.tests.factories import UserFactory # pylint: dis
|
||||
from lms.djangoapps.course_goals.toggles import COURSE_GOALS_NUMBER_OF_DAYS_GOALS
|
||||
from lms.djangoapps.mobile_api.testutils import MobileAPITestCase, MobileAuthTestMixin, MobileCourseAccessTestMixin
|
||||
from lms.djangoapps.mobile_api.utils import API_V1, API_V05
|
||||
from xmodule.html_module import CourseInfoBlock
|
||||
from xmodule.modulestore import ModuleStoreEnum
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # pylint: disable=unused-import
|
||||
from xmodule.modulestore.xml_importer import import_course_from_xml
|
||||
from xmodule.html_module import CourseInfoBlock # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=unused-import, wrong-import-order
|
||||
from xmodule.modulestore.xml_importer import import_course_from_xml # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
|
||||
@@ -15,7 +15,7 @@ from lms.djangoapps.courseware.courses import get_course_with_access
|
||||
from lms.djangoapps.courseware.courseware_access_exception import CoursewareAccessException
|
||||
from lms.djangoapps.courseware.exceptions import CourseAccessRedirect
|
||||
from openedx.core.lib.api.view_utils import view_auth_classes
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
def mobile_course_access(depth=0):
|
||||
|
||||
@@ -12,7 +12,7 @@ from common.djangoapps.util.milestones_helpers import add_prerequisite_course, f
|
||||
from lms.djangoapps.courseware.access_response import MilestoneAccessError
|
||||
from lms.djangoapps.courseware.tests.test_entrance_exam import add_entrance_exam_milestone, answer_entrance_exam_problem
|
||||
from openedx.core.djangolib.testing.utils import get_mock_request
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class MobileAPIMilestonesMixin:
|
||||
|
||||
@@ -30,8 +30,8 @@ from lms.djangoapps.courseware.access_response import MobileAvailabilityError, S
|
||||
from lms.djangoapps.mobile_api.models import IgnoreMobileAvailableFlagConfig
|
||||
from lms.djangoapps.mobile_api.tests.test_milestones import MobileAPIMilestonesMixin
|
||||
from lms.djangoapps.mobile_api.utils import API_V1
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class MobileAPITestCase(ModuleStoreTestCase, APITestCase):
|
||||
|
||||
@@ -37,8 +37,8 @@ from lms.djangoapps.mobile_api.utils import API_V1, API_V05
|
||||
from openedx.core.lib.courses import course_image_url
|
||||
from openedx.features.course_duration_limits.models import CourseDurationLimitConfig
|
||||
from openedx.features.course_experience.tests.views.helpers import add_course_mode
|
||||
from xmodule.course_module import DEFAULT_START_DATE
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
||||
from xmodule.course_module import DEFAULT_START_DATE # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from .. import errors
|
||||
from .serializers import CourseEnrollmentSerializer, CourseEnrollmentSerializerv05
|
||||
|
||||
@@ -29,8 +29,8 @@ from lms.djangoapps.courseware.module_render import get_module_for_descriptor
|
||||
from lms.djangoapps.courseware.views.index import save_positions_recursively_up
|
||||
from lms.djangoapps.mobile_api.utils import API_V1, API_V05
|
||||
from openedx.features.course_duration_limits.access import check_course_expired
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError
|
||||
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from .. import errors
|
||||
from ..decorators import mobile_course_access, mobile_view
|
||||
|
||||
@@ -52,9 +52,9 @@ from openedx.core.djangoapps.catalog.tests.factories import (
|
||||
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
|
||||
from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory
|
||||
from openedx.core.djangolib.testing.utils import CacheIsolationMixin
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory as ModulestoreCourseFactory
|
||||
from xmodule.modulestore.tests.factories import ItemFactory
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory as ModulestoreCourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import ItemFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from .. import views
|
||||
from ..constants import (
|
||||
|
||||
@@ -27,7 +27,7 @@ from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi
|
||||
from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory
|
||||
from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_completed_retirement
|
||||
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class ProgramEnrollmentRetireSignalTests(ModuleStoreTestCase):
|
||||
|
||||
@@ -11,8 +11,8 @@ import requests
|
||||
from django.urls import NoReverseMatch, reverse
|
||||
|
||||
from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
IMAGE_BOOK = ("An Image Textbook", "http://example.com/the_book/")
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ from lms.djangoapps.verify_student.tests.factories import SSOVerificationFactory
|
||||
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
|
||||
from openedx.features.content_type_gating.models import ContentTypeGatingConfig
|
||||
from openedx.features.course_duration_limits.models import CourseDurationLimitConfig
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class SupportViewTestCase(ModuleStoreTestCase):
|
||||
|
||||
@@ -18,7 +18,7 @@ from lms.djangoapps.support.decorators import require_support_permission
|
||||
from openedx.core.djangoapps.user_api.accounts.serializers import AccountUserSerializer
|
||||
from openedx.core.djangolib.oauth2_retirement_utils import retire_dot_oauth2_models
|
||||
|
||||
from edx_django_utils.user import generate_password
|
||||
from edx_django_utils.user import generate_password # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class ManageUserSupportView(View):
|
||||
|
||||
@@ -8,7 +8,7 @@ from lms.djangoapps.survey.models import SurveyAnswer
|
||||
from lms.djangoapps.survey.signals import _listen_for_lms_retire
|
||||
from lms.djangoapps.survey.tests.factories import SurveyAnswerFactory
|
||||
from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_completed_retirement
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class SurveyRetireSignalTests(ModuleStoreTestCase):
|
||||
|
||||
@@ -10,8 +10,8 @@ from django.test.client import Client
|
||||
from common.djangoapps.student.tests.factories import UserFactory
|
||||
from lms.djangoapps.survey.models import SurveyForm
|
||||
from lms.djangoapps.survey.utils import check_survey_required_and_unanswered, is_survey_required_for_course
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class SurveyModelsTests(ModuleStoreTestCase):
|
||||
|
||||
@@ -11,8 +11,8 @@ from django.urls import reverse
|
||||
|
||||
from common.djangoapps.student.tests.factories import UserFactory
|
||||
from lms.djangoapps.survey.models import SurveyAnswer, SurveyForm
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class SurveyViewsTests(ModuleStoreTestCase):
|
||||
|
||||
Reference in New Issue
Block a user