fix: look up ENABLE_CATALOG_MICROFRONTEND in settings directly, adjust tests

This commit is contained in:
Serhii Nanai
2025-09-29 14:15:57 +03:00
parent 94c00afa65
commit b448b0fe69
9 changed files with 4 additions and 18 deletions

View File

@@ -17,7 +17,6 @@ from ...mixins import PermissionAccessMixin
@ddt.ddt
@patch.dict("django.conf.settings.FEATURES", {"ENABLE_CATALOG_MICROFRONTEND": False})
class CourseSettingsViewTest(CourseTestCase, PermissionAccessMixin):
"""
Tests for CourseSettingsView.

View File

@@ -91,7 +91,6 @@ def requires_pillow_jpeg(func):
@override_settings(CONTENTSTORE=TEST_DATA_CONTENTSTORE)
@mock.patch.dict("django.conf.settings.FEATURES", {"ENABLE_CATALOG_MICROFRONTEND": False})
class ContentStoreTestCase(CourseTestCase):
"""
Base class for Content Store Test Cases
@@ -1050,7 +1049,6 @@ class MiscCourseTests(ContentStoreTestCase):
@ddt.ddt
@mock.patch.dict("django.conf.settings.FEATURES", {"ENABLE_CATALOG_MICROFRONTEND": False})
class ContentStoreTest(ContentStoreTestCase):
"""
Tests for the CMS ContentStore application.

View File

@@ -182,7 +182,6 @@ class CourseAdvanceSettingViewTest(CourseTestCase, MilestonesTestCaseMixin):
with override_settings(FEATURES={
'DISABLE_ADVANCED_SETTINGS': disable_advanced_settings,
'ENABLE_CATALOG_MICROFRONTEND': False,
}):
for handler in (
'import_handler',
@@ -222,7 +221,6 @@ class CourseAdvanceSettingViewTest(CourseTestCase, MilestonesTestCaseMixin):
@ddt.ddt
@patch.dict("django.conf.settings.FEATURES", {"ENABLE_CATALOG_MICROFRONTEND": False})
class CourseDetailsViewTest(CourseTestCase, MilestonesTestCaseMixin):
"""
Tests for modifying content on the first course settings page (course dates, overview, etc.).
@@ -1927,7 +1925,6 @@ class CourseGraderUpdatesTest(CourseTestCase):
self.assertEqual(len(self.starting_graders) + 1, len(current_graders))
@patch.dict("django.conf.settings.FEATURES", {"ENABLE_CATALOG_MICROFRONTEND": False})
class CourseEnrollmentEndFieldTest(CourseTestCase):
"""
Base class to test the enrollment end fields in the course settings details view in Studio

View File

@@ -15,7 +15,6 @@ from openedx.core.djangoapps.credit.signals.handlers import on_course_publish
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
@mock.patch.dict("django.conf.settings.FEATURES", {"ENABLE_CATALOG_MICROFRONTEND": False})
class CreditEligibilityTest(CourseTestCase):
"""
Base class to test the course settings details view in Studio for credit

View File

@@ -30,7 +30,6 @@ from common.djangoapps.util.testing import UrlResetMixin
@override_waffle_flag(toggles.LEGACY_STUDIO_CONFIGURATIONS, True)
@override_waffle_flag(toggles.LEGACY_STUDIO_GRADING, True)
@override_waffle_flag(toggles.LEGACY_STUDIO_ADVANCED_SETTINGS, True)
@patch.dict("django.conf.settings.FEATURES", {"ENABLE_CATALOG_MICROFRONTEND": False})
class TestExamSettingsView(CourseTestCase, UrlResetMixin):
"""
Unit tests for the exam settings view.