From 59039597ab7b5cb71a76b1b899d6fac4d6ce0f73 Mon Sep 17 00:00:00 2001 From: Jawayria Date: Fri, 19 Nov 2021 21:56:27 +0500 Subject: [PATCH] chore: Applied lint-amnesty on common/djangoapps/student --- common/djangoapps/student/admin.py | 2 +- common/djangoapps/student/email_helpers.py | 2 +- common/djangoapps/student/helpers.py | 2 +- .../management/commands/bulk_change_enrollment.py | 2 +- .../management/tests/test_bulk_change_enrollment.py | 4 ++-- .../tests/test_bulk_change_enrollment_csv.py | 4 ++-- .../student/management/tests/test_bulk_unenroll.py | 4 ++-- .../tests/test_change_eligibility_deadline.py | 4 ++-- .../student/management/tests/test_change_enrollment.py | 4 ++-- .../management/tests/test_create_random_users.py | 4 ++-- .../student/management/tests/test_create_test_users.py | 4 ++-- .../student/management/tests/test_transfer_students.py | 4 ++-- common/djangoapps/student/tests/test_admin_views.py | 4 ++-- .../student/tests/test_bulk_email_settings.py | 4 ++-- common/djangoapps/student/tests/test_certificates.py | 8 ++++---- common/djangoapps/student/tests/test_course_listing.py | 10 +++++----- common/djangoapps/student/tests/test_credit.py | 4 ++-- common/djangoapps/student/tests/test_email.py | 6 +++--- common/djangoapps/student/tests/test_enrollment.py | 4 ++-- common/djangoapps/student/tests/test_events.py | 10 +++++----- common/djangoapps/student/tests/test_models.py | 6 +++--- common/djangoapps/student/tests/test_receivers.py | 2 +- .../student/tests/test_recent_enrollments.py | 4 ++-- common/djangoapps/student/tests/test_refunds.py | 4 ++-- .../student/tests/test_verification_status.py | 4 ++-- common/djangoapps/student/tests/test_views.py | 8 ++++---- common/djangoapps/student/tests/tests.py | 6 +++--- common/djangoapps/student/views/dashboard.py | 2 +- common/djangoapps/student/views/management.py | 2 +- 29 files changed, 64 insertions(+), 64 deletions(-) diff --git a/common/djangoapps/student/admin.py b/common/djangoapps/student/admin.py index 0295cc96c5..d8176e3d2d 100644 --- a/common/djangoapps/student/admin.py +++ b/common/djangoapps/student/admin.py @@ -46,7 +46,7 @@ from common.djangoapps.student.models import ( UserTestGroup ) from common.djangoapps.student.roles import REGISTERED_ACCESS_ROLES -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order User = get_user_model() # pylint:disable=invalid-name diff --git a/common/djangoapps/student/email_helpers.py b/common/djangoapps/student/email_helpers.py index 70e7308704..8accbfcc04 100644 --- a/common/djangoapps/student/email_helpers.py +++ b/common/djangoapps/student/email_helpers.py @@ -12,7 +12,7 @@ from openedx.core.djangoapps.ace_common.template_context import get_base_templat from openedx.core.djangoapps.agreements.toggles import is_integrity_signature_enabled from openedx.core.djangoapps.enrollments.api import is_enrollment_valid_for_proctoring from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order def generate_activation_email_context(user, registration): diff --git a/common/djangoapps/student/helpers.py b/common/djangoapps/student/helpers.py index ce2a438728..56781937f6 100644 --- a/common/djangoapps/student/helpers.py +++ b/common/djangoapps/student/helpers.py @@ -55,7 +55,7 @@ from openedx.core.djangoapps.content.block_structure.exceptions import UsageKeyN from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.theming.helpers import get_themes from openedx.core.djangoapps.user_authn.utils import is_safe_login_or_logout_redirect -from xmodule.data import CertificatesDisplayBehaviors +from xmodule.data import CertificatesDisplayBehaviors # lint-amnesty, pylint: disable=wrong-import-order # Enumeration of per-course verification statuses # we display on the student dashboard. diff --git a/common/djangoapps/student/management/commands/bulk_change_enrollment.py b/common/djangoapps/student/management/commands/bulk_change_enrollment.py index c59b2533b6..0b71ac67e2 100644 --- a/common/djangoapps/student/management/commands/bulk_change_enrollment.py +++ b/common/djangoapps/student/management/commands/bulk_change_enrollment.py @@ -11,7 +11,7 @@ from opaque_keys.edx.keys import CourseKey from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from common.djangoapps.student.models import CourseEnrollment -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py b/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py index 9630a143d3..11f540193b 100644 --- a/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py +++ b/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py @@ -12,8 +12,8 @@ from common.djangoapps.course_modes.tests.factories import CourseModeFactory from common.djangoapps.student.models import EVENT_NAME_ENROLLMENT_MODE_CHANGED, CourseEnrollment from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order @ddt.ddt diff --git a/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py b/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py index ecdd76dc93..5d2dd88b4d 100644 --- a/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py +++ b/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py @@ -15,8 +15,8 @@ from common.djangoapps.course_modes.models import CourseMode from common.djangoapps.course_modes.tests.factories import CourseModeFactory from common.djangoapps.student.models import BulkChangeEnrollmentConfiguration, CourseEnrollment from common.djangoapps.student.tests.factories import UserFactory -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order LOGGER_NAME = 'common.djangoapps.student.management.commands.bulk_change_enrollment_csv' diff --git a/common/djangoapps/student/management/tests/test_bulk_unenroll.py b/common/djangoapps/student/management/tests/test_bulk_unenroll.py index 1088038aee..f3aa2afdb7 100644 --- a/common/djangoapps/student/management/tests/test_bulk_unenroll.py +++ b/common/djangoapps/student/management/tests/test_bulk_unenroll.py @@ -10,8 +10,8 @@ from testfixtures import LogCapture from common.djangoapps.course_modes.tests.factories import CourseModeFactory from common.djangoapps.student.models import BulkUnenrollConfiguration, CourseEnrollment from common.djangoapps.student.tests.factories import UserFactory -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order LOGGER_NAME = 'common.djangoapps.student.management.commands.bulk_unenroll' diff --git a/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py b/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py index 5c7fea30f5..1cbfa1b2c8 100644 --- a/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py +++ b/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py @@ -12,8 +12,8 @@ from common.djangoapps.course_modes.tests.factories import CourseMode from openedx.core.djangoapps.credit.models import CreditCourse, CreditEligibility from common.djangoapps.student.models import CourseEnrollment, User from common.djangoapps.student.tests.factories import UserFactory -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order LOGGER_NAME = 'common.djangoapps.student.management.commands.change_eligibility_deadline' command_args = '--username {username} --course {course} --date {date}' diff --git a/common/djangoapps/student/management/tests/test_change_enrollment.py b/common/djangoapps/student/management/tests/test_change_enrollment.py index 10680a39ba..61e024cbc8 100644 --- a/common/djangoapps/student/management/tests/test_change_enrollment.py +++ b/common/djangoapps/student/management/tests/test_change_enrollment.py @@ -9,8 +9,8 @@ from django.core.management import call_command from common.djangoapps.course_modes.tests.factories import CourseModeFactory from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.tests.factories import UserFactory -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order @ddt.ddt diff --git a/common/djangoapps/student/management/tests/test_create_random_users.py b/common/djangoapps/student/management/tests/test_create_random_users.py index d172e33a7f..dace6f6fd9 100644 --- a/common/djangoapps/student/management/tests/test_create_random_users.py +++ b/common/djangoapps/student/management/tests/test_create_random_users.py @@ -9,8 +9,8 @@ from django.core.management import call_command from opaque_keys import InvalidKeyError from common.djangoapps.student.models import CourseEnrollment -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order class CreateRandomUserTests(SharedModuleStoreTestCase): diff --git a/common/djangoapps/student/management/tests/test_create_test_users.py b/common/djangoapps/student/management/tests/test_create_test_users.py index 8b3fd3fde7..c1c0f1c427 100644 --- a/common/djangoapps/student/management/tests/test_create_test_users.py +++ b/common/djangoapps/student/management/tests/test_create_test_users.py @@ -13,8 +13,8 @@ from opaque_keys import InvalidKeyError from common.djangoapps.student.helpers import AccountValidationError from common.djangoapps.student.models import CourseAccessRole, CourseEnrollment from common.djangoapps.student.roles import CourseStaffRole -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order @ddt.ddt diff --git a/common/djangoapps/student/management/tests/test_transfer_students.py b/common/djangoapps/student/management/tests/test_transfer_students.py index d3b8c744f3..f42ab66e10 100644 --- a/common/djangoapps/student/management/tests/test_transfer_students.py +++ b/common/djangoapps/student/management/tests/test_transfer_students.py @@ -20,8 +20,8 @@ from common.djangoapps.student.models import ( ) from common.djangoapps.student.signals import UNENROLL_DONE 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 @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') diff --git a/common/djangoapps/student/tests/test_admin_views.py b/common/djangoapps/student/tests/test_admin_views.py index c19af00518..5c6350c2f0 100644 --- a/common/djangoapps/student/tests/test_admin_views.py +++ b/common/djangoapps/student/tests/test_admin_views.py @@ -27,8 +27,8 @@ from common.djangoapps.student.models import AllowedAuthUser, CourseEnrollment, from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order class AdminCourseRolesPageTest(SharedModuleStoreTestCase): diff --git a/common/djangoapps/student/tests/test_bulk_email_settings.py b/common/djangoapps/student/tests/test_bulk_email_settings.py index 60220dfb6f..10d8c0629d 100644 --- a/common/djangoapps/student/tests/test_bulk_email_settings.py +++ b/common/djangoapps/student/tests/test_bulk_email_settings.py @@ -16,8 +16,8 @@ from django.urls import reverse from lms.djangoapps.bulk_email.api import is_bulk_email_feature_enabled from lms.djangoapps.bulk_email.models import BulkEmailFlag, CourseAuthorization from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') diff --git a/common/djangoapps/student/tests/test_certificates.py b/common/djangoapps/student/tests/test_certificates.py index f83d76dff1..f997d0e8a4 100644 --- a/common/djangoapps/student/tests/test_certificates.py +++ b/common/djangoapps/student/tests/test_certificates.py @@ -19,10 +19,10 @@ from lms.djangoapps.certificates.tests.factories import ( GeneratedCertificateFactory, LinkedInAddToProfileConfigurationFactory ) -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory -from xmodule.data import CertificatesDisplayBehaviors +from xmodule.modulestore import ModuleStoreEnum # 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=wrong-import-order +from xmodule.data import CertificatesDisplayBehaviors # lint-amnesty, pylint: disable=wrong-import-order # pylint: disable=no-member diff --git a/common/djangoapps/student/tests/test_course_listing.py b/common/djangoapps/student/tests/test_course_listing.py index 9b16ec9999..e93ec5f817 100644 --- a/common/djangoapps/student/tests/test_course_listing.py +++ b/common/djangoapps/student/tests/test_course_listing.py @@ -17,11 +17,11 @@ from common.djangoapps.student.roles import GlobalStaff from common.djangoapps.student.tests.factories import UserFactory from common.djangoapps.student.views import get_course_enrollments from common.djangoapps.util.milestones_helpers import get_pre_requisite_courses_not_completed, set_prerequisite_courses -from xmodule.error_module import ErrorBlock -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 +from xmodule.error_module import ErrorBlock # 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 ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order class TestCourseListing(ModuleStoreTestCase, MilestonesTestCaseMixin): diff --git a/common/djangoapps/student/tests/test_credit.py b/common/djangoapps/student/tests/test_credit.py index 5e5ee9cc88..afd7fc4637 100644 --- a/common/djangoapps/student/tests/test_credit.py +++ b/common/djangoapps/student/tests/test_credit.py @@ -17,8 +17,8 @@ from common.djangoapps.student.models import CourseEnrollmentAttribute from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from openedx.core.djangoapps.credit import api as credit_api from openedx.core.djangoapps.credit.models import CreditCourse, CreditEligibility, CreditProvider -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 TEST_CREDIT_PROVIDER_SECRET_KEY = "931433d583c84ca7ba41784bad3232e6" diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py index 7ba33eccd9..d6155e8a40 100644 --- a/common/djangoapps/student/tests/test_email.py +++ b/common/djangoapps/student/tests/test_email.py @@ -36,9 +36,9 @@ from openedx.core.djangoapps.agreements.toggles import ENABLE_INTEGRITY_SIGNATUR from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme from openedx.core.djangolib.testing.utils import CacheIsolationMixin, CacheIsolationTestCase -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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 # lint-amnesty, pylint: disable=wrong-import-order class TestException(Exception): diff --git a/common/djangoapps/student/tests/test_enrollment.py b/common/djangoapps/student/tests/test_enrollment.py index 5165ca57d2..b1b7aece95 100644 --- a/common/djangoapps/student/tests/test_enrollment.py +++ b/common/djangoapps/student/tests/test_enrollment.py @@ -24,8 +24,8 @@ from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRol from common.djangoapps.student.tests.factories import CourseEnrollmentAllowedFactory, UserFactory from common.djangoapps.util.testing import UrlResetMixin from openedx.core.djangoapps.embargo.test_utils import restrict_course -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory +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 @ddt.ddt diff --git a/common/djangoapps/student/tests/test_events.py b/common/djangoapps/student/tests/test_events.py index 2d3f17b0cf..a8b70ea4b8 100644 --- a/common/djangoapps/student/tests/test_events.py +++ b/common/djangoapps/student/tests/test_events.py @@ -14,22 +14,22 @@ from common.djangoapps.student.models import CourseEnrollmentAllowed, CourseEnro from common.djangoapps.student.tests.factories import CourseEnrollmentAllowedFactory, UserFactory, UserProfileFactory from common.djangoapps.student.tests.tests import UserSettingsEventTestMixin -from openedx_events.learning.data import ( +from openedx_events.learning.data import ( # lint-amnesty, pylint: disable=wrong-import-order CourseData, CourseEnrollmentData, UserData, UserPersonalData, ) -from openedx_events.learning.signals import ( +from openedx_events.learning.signals import ( # lint-amnesty, pylint: disable=wrong-import-order COURSE_ENROLLMENT_CHANGED, COURSE_ENROLLMENT_CREATED, COURSE_UNENROLLMENT_COMPLETED, ) -from openedx_events.tests.utils import OpenEdxEventsTestMixin +from openedx_events.tests.utils import OpenEdxEventsTestMixin # lint-amnesty, pylint: disable=wrong-import-order from openedx.core.djangolib.testing.utils import skip_unless_lms -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order class TestUserProfileEvents(UserSettingsEventTestMixin, TestCase): diff --git a/common/djangoapps/student/tests/test_models.py b/common/djangoapps/student/tests/test_models.py index 6bd2cc7486..1d5bffa715 100644 --- a/common/djangoapps/student/tests/test_models.py +++ b/common/djangoapps/student/tests/test_models.py @@ -40,9 +40,9 @@ from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi from openedx.core.djangoapps.schedules.models import Schedule from openedx.core.djangoapps.user_api.preferences.api import set_user_preference from openedx.core.djangolib.testing.utils import skip_unless_lms -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +from xmodule.modulestore import ModuleStoreEnum # 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=wrong-import-order @ddt.ddt diff --git a/common/djangoapps/student/tests/test_receivers.py b/common/djangoapps/student/tests/test_receivers.py index 4d1a754b68..7327147add 100644 --- a/common/djangoapps/student/tests/test_receivers.py +++ b/common/djangoapps/student/tests/test_receivers.py @@ -13,7 +13,7 @@ from common.djangoapps.student.tests.factories import ( UserFactory, UserProfileFactory ) -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase +from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order class ReceiversTest(SharedModuleStoreTestCase): diff --git a/common/djangoapps/student/tests/test_recent_enrollments.py b/common/djangoapps/student/tests/test_recent_enrollments.py index a9cbdd94e2..9bd534c608 100644 --- a/common/djangoapps/student/tests/test_recent_enrollments.py +++ b/common/djangoapps/student/tests/test_recent_enrollments.py @@ -18,8 +18,8 @@ from common.djangoapps.student.models import CourseEnrollment, DashboardConfigur from common.djangoapps.student.tests.factories import UserFactory from common.djangoapps.student.views import get_course_enrollments from common.djangoapps.student.views.dashboard import _get_recently_enrolled_courses -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 @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') diff --git a/common/djangoapps/student/tests/test_refunds.py b/common/djangoapps/student/tests/test_refunds.py index ccc1a27fc3..6493dea42a 100644 --- a/common/djangoapps/student/tests/test_refunds.py +++ b/common/djangoapps/student/tests/test_refunds.py @@ -27,8 +27,8 @@ from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.certificates.data import CertificateStatuses from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from openedx.core.djangoapps.commerce.utils import ECOMMERCE_DATE_FORMAT -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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=wrong-import-order log = logging.getLogger(__name__) TEST_API_URL = 'http://www-internal.example.com/api' diff --git a/common/djangoapps/student/tests/test_verification_status.py b/common/djangoapps/student/tests/test_verification_status.py index 4f4305df4f..10020307ef 100644 --- a/common/djangoapps/student/tests/test_verification_status.py +++ b/common/djangoapps/student/tests/test_verification_status.py @@ -26,8 +26,8 @@ from common.djangoapps.student.helpers import ( from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from common.djangoapps.util.testing import UrlResetMixin from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification, VerificationDeadline -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 from openedx.core.djangoapps.agreements.toggles import ENABLE_INTEGRITY_SIGNATURE diff --git a/common/djangoapps/student/tests/test_views.py b/common/djangoapps/student/tests/test_views.py index 9dc924d9ca..6176dcf30a 100644 --- a/common/djangoapps/student/tests/test_views.py +++ b/common/djangoapps/student/tests/test_views.py @@ -42,10 +42,10 @@ from openedx.core.djangoapps.content.course_overviews.tests.factories import Cou from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context from openedx.features.course_duration_limits.models import CourseDurationLimitConfig from openedx.features.course_experience.tests.views.helpers import add_course_mode -from xmodule.data import CertificatesDisplayBehaviors -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory +from xmodule.data import CertificatesDisplayBehaviors # 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 SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order PASSWORD = 'test' TOMORROW = now() + timedelta(days=1) diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index e82036593d..a2e4c8a5de 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -47,9 +47,9 @@ from openedx.core.djangoapps.content.course_overviews.tests.factories import Cou from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms -from xmodule.modulestore.tests.django_utils import ModuleStoreEnum, ModuleStoreTestCase, SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls -from xmodule.data import CertificatesDisplayBehaviors +from xmodule.modulestore.tests.django_utils import ModuleStoreEnum, ModuleStoreTestCase, SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.data import CertificatesDisplayBehaviors # lint-amnesty, pylint: disable=wrong-import-order log = logging.getLogger(__name__) diff --git a/common/djangoapps/student/views/dashboard.py b/common/djangoapps/student/views/dashboard.py index cc50eb0372..56a77c57f1 100644 --- a/common/djangoapps/student/views/dashboard.py +++ b/common/djangoapps/student/views/dashboard.py @@ -58,7 +58,7 @@ from common.djangoapps.student.models import ( UserProfile ) from common.djangoapps.util.milestones_helpers import get_pre_requisite_courses_not_completed -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order log = logging.getLogger("edx.student") diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index 4f28f7e289..bb81cdd73e 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -74,7 +74,7 @@ from common.djangoapps.student.models import ( # lint-amnesty, pylint: disable= from common.djangoapps.student.signals import REFUND_ORDER from common.djangoapps.util.db import outer_atomic from common.djangoapps.util.json_request import JsonResponse -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order log = logging.getLogger("edx.student")