From c42e356f95b31d3602fdb833f1e8ce01753e1ee1 Mon Sep 17 00:00:00 2001 From: Jawayria Date: Wed, 24 Nov 2021 15:54:06 +0500 Subject: [PATCH] chore: Applied lint-amnesty on cms/djangoapps/contentstore/tests --- .../contentstore/tests/test_clone_course.py | 8 ++--- .../contentstore/tests/test_contentstore.py | 30 +++++++++---------- .../contentstore/tests/test_course_listing.py | 8 ++--- .../tests/test_course_settings.py | 8 ++--- .../tests/test_courseware_index.py | 12 ++++---- .../contentstore/tests/test_export_git.py | 2 +- .../contentstore/tests/test_gating.py | 4 +-- .../contentstore/tests/test_i18n.py | 6 ++-- .../contentstore/tests/test_libraries.py | 10 +++---- .../contentstore/tests/test_orphan.py | 6 ++-- .../contentstore/tests/test_outlines.py | 6 ++-- .../contentstore/tests/test_permissions.py | 2 +- .../contentstore/tests/test_proctoring.py | 6 ++-- .../contentstore/tests/test_signals.py | 4 +-- .../contentstore/tests/test_tasks.py | 2 +- .../tests/test_transcripts_utils.py | 12 ++++---- .../tests/test_users_default_role.py | 2 +- .../contentstore/tests/test_utils.py | 10 +++---- cms/djangoapps/contentstore/tests/tests.py | 4 +-- cms/djangoapps/contentstore/tests/utils.py | 16 +++++----- 20 files changed, 79 insertions(+), 79 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_clone_course.py b/cms/djangoapps/contentstore/tests/test_clone_course.py index f6ef12fddb..1c84055a11 100644 --- a/cms/djangoapps/contentstore/tests/test_clone_course.py +++ b/cms/djangoapps/contentstore/tests/test_clone_course.py @@ -14,10 +14,10 @@ from cms.djangoapps.contentstore.tests.utils import CourseTestCase from common.djangoapps.course_action_state.managers import CourseRerunUIStateManager from common.djangoapps.course_action_state.models import CourseRerunState from common.djangoapps.student.auth import has_course_author_access -from xmodule.contentstore.content import StaticContent -from xmodule.contentstore.django import contentstore -from xmodule.modulestore import EdxJSONEncoder, ModuleStoreEnum -from xmodule.modulestore.tests.factories import CourseFactory +from xmodule.contentstore.content import StaticContent # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.contentstore.django import contentstore # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore import EdxJSONEncoder, ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 343ff82740..5a37a96cce 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -36,21 +36,21 @@ from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.roles import CourseCreatorRole, CourseInstructorRole from openedx.core.djangoapps.django_comment_common.utils import are_permissions_roles_seeded from openedx.core.lib.tempdir import mkdtemp_clean -from xmodule.capa_module import ProblemBlock -from xmodule.contentstore.content import StaticContent -from xmodule.contentstore.django import contentstore -from xmodule.contentstore.utils import empty_asset_trashcan, restore_asset_from_trashcan -from xmodule.course_module import CourseBlock, Textbook -from xmodule.exceptions import InvalidVersionError -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.exceptions import ItemNotFoundError -from xmodule.modulestore.inheritance import own_metadata -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, check_mongo_calls -from xmodule.modulestore.xml_exporter import export_course_to_xml -from xmodule.modulestore.xml_importer import import_course_from_xml, perform_xlint -from xmodule.seq_module import SequenceBlock -from xmodule.video_module import VideoBlock +from xmodule.capa_module import ProblemBlock # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.contentstore.content import StaticContent # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.contentstore.django import contentstore # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.contentstore.utils import empty_asset_trashcan, restore_asset_from_trashcan # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.course_module import CourseBlock, Textbook # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.exceptions import InvalidVersionError # 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.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.inheritance import own_metadata # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.xml_exporter import export_course_to_xml # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.xml_importer import import_course_from_xml, perform_xlint # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.seq_module import SequenceBlock # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.video_module import VideoBlock # lint-amnesty, pylint: disable=wrong-import-order TEST_DATA_CONTENTSTORE = copy.deepcopy(settings.CONTENTSTORE) TEST_DATA_CONTENTSTORE['DOC_STORE_CONFIG']['db'] = 'test_xcontent_%s' % uuid4().hex diff --git a/cms/djangoapps/contentstore/tests/test_course_listing.py b/cms/djangoapps/contentstore/tests/test_course_listing.py index ef4c8d4669..422324baec 100644 --- a/cms/djangoapps/contentstore/tests/test_course_listing.py +++ b/cms/djangoapps/contentstore/tests/test_course_listing.py @@ -32,10 +32,10 @@ from common.djangoapps.student.roles import ( UserBasedRole ) from common.djangoapps.student.tests.factories import UserFactory -from xmodule.course_module import CourseSummary -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls +from xmodule.course_module import CourseSummary # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore import ModuleStoreEnum # 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, check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order TOTAL_COURSES_COUNT = 10 USER_COURSES_COUNT = 1 diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index a85592b9ca..3b36efb4a9 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -39,10 +39,10 @@ from openedx.core.djangoapps.discussions.config.waffle import ( OVERRIDE_DISCUSSION_LEGACY_SETTINGS_FLAG ) from openedx.core.djangoapps.models.course_details import CourseDetails -from xmodule.fields import Date -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.tests.factories import CourseFactory +from xmodule.fields import Date # 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.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order from .utils import AjaxEnabledTestClient, CourseTestCase diff --git a/cms/djangoapps/contentstore/tests/test_courseware_index.py b/cms/djangoapps/contentstore/tests/test_courseware_index.py index 22b05eaff9..ac534d7604 100644 --- a/cms/djangoapps/contentstore/tests/test_courseware_index.py +++ b/cms/djangoapps/contentstore/tests/test_courseware_index.py @@ -27,17 +27,17 @@ from cms.djangoapps.contentstore.utils import reverse_course_url, reverse_usage_ from common.djangoapps.course_modes.models import CourseMode from common.djangoapps.course_modes.tests.factories import CourseModeFactory from openedx.core.djangoapps.models.course_details import CourseDetails -from xmodule.library_tools import normalize_key_for_search -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.django import SignalHandler, modulestore -from xmodule.modulestore.tests.django_utils import ( +from xmodule.library_tools import normalize_key_for_search # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.django import SignalHandler, modulestore # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.django_utils import ( # lint-amnesty, pylint: disable=wrong-import-order ModuleStoreTestCase, TEST_DATA_MONGO_MODULESTORE, TEST_DATA_SPLIT_MODULESTORE, SharedModuleStoreTestCase, ) -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, LibraryFactory -from xmodule.partitions.partitions import UserPartition +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, LibraryFactory # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.partitions.partitions import UserPartition # lint-amnesty, pylint: disable=wrong-import-order COURSE_CHILD_STRUCTURE = { "course": "chapter", diff --git a/cms/djangoapps/contentstore/tests/test_export_git.py b/cms/djangoapps/contentstore/tests/test_export_git.py index 21d0c89788..d853a7a4a3 100644 --- a/cms/djangoapps/contentstore/tests/test_export_git.py +++ b/cms/djangoapps/contentstore/tests/test_export_git.py @@ -14,7 +14,7 @@ from django.test.utils import override_settings import cms.djangoapps.contentstore.git_export_utils as git_export_utils from cms.djangoapps.contentstore.utils import reverse_course_url -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order from .utils import CourseTestCase diff --git a/cms/djangoapps/contentstore/tests/test_gating.py b/cms/djangoapps/contentstore/tests/test_gating.py index 5f7bf639c7..e7d26aafb9 100644 --- a/cms/djangoapps/contentstore/tests/test_gating.py +++ b/cms/djangoapps/contentstore/tests/test_gating.py @@ -9,8 +9,8 @@ from milestones.tests.utils import MilestonesTestCaseMixin from cms.djangoapps.contentstore.signals.handlers import handle_item_deleted from openedx.core.lib.gating import api as gating_api -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order class TestHandleItemDeleted(ModuleStoreTestCase, MilestonesTestCaseMixin): diff --git a/cms/djangoapps/contentstore/tests/test_i18n.py b/cms/djangoapps/contentstore/tests/test_i18n.py index da35d8eb9f..9ec3c8548d 100644 --- a/cms/djangoapps/contentstore/tests/test_i18n.py +++ b/cms/djangoapps/contentstore/tests/test_i18n.py @@ -13,9 +13,9 @@ from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient from cms.djangoapps.contentstore.views.preview import _preview_module_system from common.djangoapps.student.tests.factories import UserFactory from openedx.core.lib.edx_six import get_gettext -from xmodule.modulestore.django import ModuleI18nService -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory +from xmodule.modulestore.django import ModuleI18nService # 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, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order class FakeTranslations(ModuleI18nService): diff --git a/cms/djangoapps/contentstore/tests/test_libraries.py b/cms/djangoapps/contentstore/tests/test_libraries.py index 9ecb7da2cd..3f602055ae 100644 --- a/cms/djangoapps/contentstore/tests/test_libraries.py +++ b/cms/djangoapps/contentstore/tests/test_libraries.py @@ -27,11 +27,11 @@ from common.djangoapps.student.roles import ( ) from common.djangoapps.student.tests.factories import UserFactory from common.djangoapps.xblock_django.user_service import DjangoXBlockUserService -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory -from xmodule.x_module import STUDIO_VIEW +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 ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.x_module import STUDIO_VIEW # lint-amnesty, pylint: disable=wrong-import-order class LibraryTestCase(ModuleStoreTestCase): diff --git a/cms/djangoapps/contentstore/tests/test_orphan.py b/cms/djangoapps/contentstore/tests/test_orphan.py index 1e19bc21fc..e0489f73e6 100644 --- a/cms/djangoapps/contentstore/tests/test_orphan.py +++ b/cms/djangoapps/contentstore/tests/test_orphan.py @@ -11,9 +11,9 @@ from opaque_keys.edx.locator import BlockUsageLocator from cms.djangoapps.contentstore.tests.utils import CourseTestCase from cms.djangoapps.contentstore.utils import reverse_course_url from common.djangoapps.student.models import CourseEnrollment -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.search import path_to_location -from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls_range +from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.search import path_to_location # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls_range # lint-amnesty, pylint: disable=wrong-import-order class TestOrphanBase(CourseTestCase): diff --git a/cms/djangoapps/contentstore/tests/test_outlines.py b/cms/djangoapps/contentstore/tests/test_outlines.py index 27515a25a6..b712d85871 100644 --- a/cms/djangoapps/contentstore/tests/test_outlines.py +++ b/cms/djangoapps/contentstore/tests/test_outlines.py @@ -8,9 +8,9 @@ from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.content.learning_sequences.api import get_course_outline from openedx.core.djangoapps.content.learning_sequences.data import CourseOutlineData, ExamData, VisibilityData -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory +from xmodule.modulestore import ModuleStoreEnum # 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, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order from ..outlines import get_outline_from_modulestore diff --git a/cms/djangoapps/contentstore/tests/test_permissions.py b/cms/djangoapps/contentstore/tests/test_permissions.py index aa2a218dec..5b61ced685 100644 --- a/cms/djangoapps/contentstore/tests/test_permissions.py +++ b/cms/djangoapps/contentstore/tests/test_permissions.py @@ -10,7 +10,7 @@ from cms.djangoapps.contentstore.utils import reverse_course_url, reverse_url from common.djangoapps.student import auth from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole, OrgInstructorRole, OrgStaffRole from common.djangoapps.student.tests.factories import UserFactory -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order class TestCourseAccess(ModuleStoreTestCase): diff --git a/cms/djangoapps/contentstore/tests/test_proctoring.py b/cms/djangoapps/contentstore/tests/test_proctoring.py index a24116f9f1..fc0de385a3 100644 --- a/cms/djangoapps/contentstore/tests/test_proctoring.py +++ b/cms/djangoapps/contentstore/tests/test_proctoring.py @@ -13,9 +13,9 @@ from pytz import UTC from cms.djangoapps.contentstore.signals.handlers import listen_for_course_publish from common.djangoapps.student.tests.factories import UserFactory -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory +from xmodule.modulestore import ModuleStoreEnum # 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, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order @ddt.ddt diff --git a/cms/djangoapps/contentstore/tests/test_signals.py b/cms/djangoapps/contentstore/tests/test_signals.py index e7eb6eadc0..de66134a44 100644 --- a/cms/djangoapps/contentstore/tests/test_signals.py +++ b/cms/djangoapps/contentstore/tests/test_signals.py @@ -8,8 +8,8 @@ import ddt from cms.djangoapps.contentstore.signals.handlers import GRADING_POLICY_COUNTDOWN_SECONDS, handle_grading_policy_changed from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.tests.factories import 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 @ddt.ddt diff --git a/cms/djangoapps/contentstore/tests/test_tasks.py b/cms/djangoapps/contentstore/tests/test_tasks.py index 73497824d5..ad904e3e4b 100644 --- a/cms/djangoapps/contentstore/tests/test_tasks.py +++ b/cms/djangoapps/contentstore/tests/test_tasks.py @@ -22,7 +22,7 @@ from cms.djangoapps.contentstore.tests.utils import CourseTestCase from common.djangoapps.course_action_state.models import CourseRerunState from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.embargo.models import Country, CountryAccessRule, RestrictedCourse -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order TEST_DATA_CONTENTSTORE = copy.deepcopy(settings.CONTENTSTORE) TEST_DATA_CONTENTSTORE['DOC_STORE_CONFIG']['db'] = 'test_xcontent_%s' % uuid4().hex diff --git a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py index 216b31651b..bfee1d79b9 100644 --- a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py +++ b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py @@ -17,12 +17,12 @@ from django.utils import translation from cms.djangoapps.contentstore.tests.utils import mock_requests_get from common.djangoapps.student.tests.factories import UserFactory -from xmodule.contentstore.content import StaticContent -from xmodule.contentstore.django import contentstore -from xmodule.exceptions import NotFoundError -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory -from xmodule.video_module import transcripts_utils +from xmodule.contentstore.content import StaticContent # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.contentstore.django import contentstore # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.exceptions import NotFoundError # 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, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.video_module import transcripts_utils # lint-amnesty, pylint: disable=wrong-import-order TEST_DATA_CONTENTSTORE = copy.deepcopy(settings.CONTENTSTORE) TEST_DATA_CONTENTSTORE['DOC_STORE_CONFIG']['db'] = 'test_xcontent_%s' % uuid4().hex diff --git a/cms/djangoapps/contentstore/tests/test_users_default_role.py b/cms/djangoapps/contentstore/tests/test_users_default_role.py index dd4420276b..67967134df 100644 --- a/cms/djangoapps/contentstore/tests/test_users_default_role.py +++ b/cms/djangoapps/contentstore/tests/test_users_default_role.py @@ -8,7 +8,7 @@ from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient from cms.djangoapps.contentstore.utils import delete_course, reverse_url from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.tests.factories import UserFactory -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order class TestUsersDefaultRole(ModuleStoreTestCase): diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index 78210894cc..2ed40b6942 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -18,11 +18,11 @@ from cms.djangoapps.contentstore import utils from cms.djangoapps.contentstore.tasks import ALL_ALLOWED_XBLOCKS, validate_course_olx from cms.djangoapps.contentstore.tests.utils import TEST_DATA_DIR, CourseTestCase from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory -from xmodule.partitions.partitions import Group, UserPartition +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 ModuleStoreTestCase, SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.partitions.partitions import Group, UserPartition # lint-amnesty, pylint: disable=wrong-import-order class LMSLinksTestCase(TestCase): diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 8a146405eb..0194ce9f57 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -16,8 +16,8 @@ from pytz import UTC from cms.djangoapps.contentstore.tests.test_course_settings import CourseTestCase from cms.djangoapps.contentstore.tests.utils import AjaxEnabledTestClient, parse_json, registration, user -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 ContentStoreTestCase(ModuleStoreTestCase): diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 7389a5a7e1..2fa8d0cdad 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -14,14 +14,14 @@ from opaque_keys.edx.keys import AssetKey, CourseKey from cms.djangoapps.contentstore.utils import reverse_url from common.djangoapps.student.models import Registration -from xmodule.contentstore.django import contentstore -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.inheritance import own_metadata -from xmodule.modulestore.split_mongo.split import SplitMongoModuleStore -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory -from xmodule.modulestore.tests.utils import ProceduralCourseTestMixin -from xmodule.modulestore.xml_importer import import_course_from_xml +from xmodule.contentstore.django import contentstore # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.inheritance import own_metadata # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.split_mongo.split import SplitMongoModuleStore # 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 # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.utils import ProceduralCourseTestMixin # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.xml_importer import import_course_from_xml # lint-amnesty, pylint: disable=wrong-import-order TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT