Skip to content

Commit 86db1d4

Browse files
authored
Merge branch 'master' into pwnage101/ENT-11510
2 parents b86a3ab + 5cfc6c8 commit 86db1d4

1,809 files changed

Lines changed: 7987 additions & 5846 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cms/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
# ruff: noqa: I001
12
"""
23
Celery needs to be loaded when the cms modules are so that task
34
registration and discovery can work correctly.
45
56
Import sorting is intentionally disabled in this module.
6-
isort:skip_file
77
"""
88

99

cms/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: I001
12
"""
23
Studio unit test configuration and fixtures.
34
@@ -13,7 +14,7 @@
1314
from openedx.core.pytest_hooks import DeferPlugin
1415

1516
# Patch the xml libs before anything else.
16-
from openedx.core.lib.safe_lxml import defuse_xml_libs # isort:skip
17+
from openedx.core.lib.safe_lxml import defuse_xml_libs # must patch xml libs before other imports execute
1718
defuse_xml_libs()
1819

1920

cms/djangoapps/api/urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"""
44

55

6-
from django.urls import include
7-
from django.urls import path
6+
from django.urls import include, path
87

98
app_name = 'cms.djangoapps.api'
109

cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33

44
import datetime
5+
56
import ddt
67
import pytz
78
from django.test import RequestFactory
89

910
from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole
1011
from common.djangoapps.student.tests.factories import UserFactory
1112
from openedx.core.lib.courses import course_image_url
12-
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
13+
from xmodule.modulestore.tests.django_utils import (
14+
ModuleStoreTestCase, # lint-amnesty, pylint: disable=wrong-import-order
15+
)
1316
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
1417

1518
from ...serializers.course_runs import CourseRunSerializer

cms/djangoapps/api/v1/tests/test_views/test_course_runs.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@
2020
from xmodule.contentstore.django import contentstore # lint-amnesty, pylint: disable=wrong-import-order
2121
from xmodule.exceptions import NotFoundError # lint-amnesty, pylint: disable=wrong-import-order
2222
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
23-
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
24-
from xmodule.modulestore.tests.factories import CourseFactory, ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order
23+
from xmodule.modulestore.tests.django_utils import (
24+
ModuleStoreTestCase, # lint-amnesty, pylint: disable=wrong-import-order
25+
)
26+
from xmodule.modulestore.tests.factories import ( # lint-amnesty, pylint: disable=wrong-import-order
27+
CourseFactory,
28+
ToyCourseFactory,
29+
)
2530

2631
from ...serializers.course_runs import CourseRunSerializer
2732
from ..utils import serialize_datetime

cms/djangoapps/api/v1/views/course_runs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
CourseRunCreateSerializer,
1616
CourseRunImageSerializer,
1717
CourseRunRerunSerializer,
18-
CourseRunSerializer
18+
CourseRunSerializer,
1919
)
2020

2121

cms/djangoapps/contentstore/api/tests/base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55

66
from django.urls import reverse
77
from rest_framework.test import APITestCase
8-
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
9-
from xmodule.modulestore.tests.factories import CourseFactory, BlockFactory
108

11-
from common.djangoapps.student.tests.factories import StaffFactory
12-
from common.djangoapps.student.tests.factories import UserFactory
9+
from common.djangoapps.student.tests.factories import StaffFactory, UserFactory
10+
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
11+
from xmodule.modulestore.tests.factories import BlockFactory, CourseFactory
1312

1413

1514
# pylint: disable=unused-variable

cms/djangoapps/contentstore/api/tests/test_import.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
from rest_framework import status
1313
from rest_framework.test import APITestCase
1414
from user_tasks.models import UserTaskStatus
15+
16+
from common.djangoapps.student.tests.factories import StaffFactory, UserFactory
1517
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
1618
from xmodule.modulestore.tests.factories import CourseFactory
1719

18-
from common.djangoapps.student.tests.factories import StaffFactory
19-
from common.djangoapps.student.tests.factories import UserFactory
20-
2120

2221
class CourseImportViewTest(SharedModuleStoreTestCase, APITestCase):
2322
"""

cms/djangoapps/contentstore/api/tests/test_quality.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
Tests for the course import API views
33
"""
44

5-
from rest_framework.test import APIClient
5+
from openedx_authz.constants.roles import COURSE_DATA_RESEARCHER, COURSE_STAFF
66
from rest_framework import status
7-
from openedx_authz.constants.roles import COURSE_STAFF, COURSE_DATA_RESEARCHER
7+
from rest_framework.test import APIClient
88

99
from common.djangoapps.student.tests.factories import UserFactory
1010
from openedx.core.djangoapps.authz.tests.mixins import CourseAuthzTestMixin
11+
1112
from .base import BaseCourseViewTest
1213

1314

cms/djangoapps/contentstore/api/tests/test_validation.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,21 @@
77

88
import ddt
99
import factory
10-
1110
from django.conf import settings
1211
from django.contrib.auth import get_user_model
1312
from django.test.utils import override_settings
1413
from django.urls import reverse
14+
from openedx_authz.constants.roles import COURSE_DATA_RESEARCHER, COURSE_STAFF
1515
from rest_framework import status
16-
from rest_framework.test import APITestCase
17-
from rest_framework.test import APIClient
18-
from openedx.core.djangoapps.authz.tests.mixins import CourseAuthzTestMixin
19-
from openedx_authz.constants.roles import COURSE_STAFF, COURSE_DATA_RESEARCHER
16+
from rest_framework.test import APIClient, APITestCase
2017

18+
from cms.djangoapps.contentstore.api.tests.base import BaseCourseViewTest
2119
from common.djangoapps.course_modes.models import CourseMode
2220
from common.djangoapps.course_modes.tests.factories import CourseModeFactory
2321
from common.djangoapps.student.tests.factories import StaffFactory, UserFactory
22+
from openedx.core.djangoapps.authz.tests.mixins import CourseAuthzTestMixin
2423
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
2524
from xmodule.modulestore.tests.factories import BlockFactory, CourseFactory
26-
from cms.djangoapps.contentstore.api.tests.base import BaseCourseViewTest
2725

2826
User = get_user_model()
2927

0 commit comments

Comments
 (0)