diff --git a/cms/djangoapps/contentstore/management/commands/backfill_orgs_and_org_courses.py b/cms/djangoapps/contentstore/management/commands/backfill_orgs_and_org_courses.py index f8a122488c26..c599ecb35473 100644 --- a/cms/djangoapps/contentstore/management/commands/backfill_orgs_and_org_courses.py +++ b/cms/djangoapps/contentstore/management/commands/backfill_orgs_and_org_courses.py @@ -23,7 +23,7 @@ class Command(BaseCommand): In Lilac and beyond, the edx-organizations models are enabled globally. This command exists to migrate pre-Lilac instances that did not enable - `FEATURES['ORGANIZATIONS_APP']`. + the ``ORGANIZATIONS_APP`` feature flag. It automatically creates all missing Organization and OrganizationCourse instances based on the course runs in the system (loaded from CourseOverview) and the V1 content libraries in the system (loaded from the Modulestore). diff --git a/common/djangoapps/student/models/user.py b/common/djangoapps/student/models/user.py index 4607cb40a8f7..668a3b941fd7 100644 --- a/common/djangoapps/student/models/user.py +++ b/common/djangoapps/student/models/user.py @@ -1004,7 +1004,7 @@ def is_feature_enabled(cls): """ Returns whether the feature flag around this functionality has been set """ - return settings.FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS'] + return settings.ENABLE_MAX_FAILED_LOGIN_ATTEMPTS @classmethod def is_user_locked_out(cls, user): @@ -1313,7 +1313,7 @@ def log_successful_login(sender, request, user, **kwargs): # pylint: disable=un 'event_type': "login", } ) - if settings.FEATURES['SQUELCH_PII_IN_LOGS']: + if settings.SQUELCH_PII_IN_LOGS: AUDIT_LOG.info(f"Login success - user.id: {user.id}") else: AUDIT_LOG.info(f"Login success - {user.username} ({user.email})") @@ -1330,7 +1330,7 @@ def log_successful_logout(sender, request, user, **kwargs): # pylint: disable=u 'event_type': "logout", } ) - if settings.FEATURES['SQUELCH_PII_IN_LOGS']: + if settings.SQUELCH_PII_IN_LOGS: AUDIT_LOG.info(f'Logout - user.id: {request.user.id}') # pylint: disable=logging-format-interpolation else: AUDIT_LOG.info(f'Logout - {request.user}') # pylint: disable=logging-format-interpolation diff --git a/common/djangoapps/student/tests/test_admin_views.py b/common/djangoapps/student/tests/test_admin_views.py index ef9d894445db..373b2140cb78 100644 --- a/common/djangoapps/student/tests/test_admin_views.py +++ b/common/djangoapps/student/tests/test_admin_views.py @@ -353,7 +353,7 @@ def test_unicode_username(self): assert str(LoginFailures.objects.get(user=self.user)) == f'§: 10 - {self.user_lockout_until.isoformat()}' assert str(LoginFailures.objects.get(user=self.user2)) == 'Zażółć gęślą jaźń: 2 - -' - @override_settings(FEATURES={'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': True}) + @override_settings(ENABLE_MAX_FAILED_LOGIN_ATTEMPTS=True) def test_feature_enabled(self): url = reverse('admin:student_loginfailures_changelist') response = self.client.get(url) @@ -372,7 +372,7 @@ def test_feature_disabled(self, url): response = self.client.post(url) assert response.status_code == 403 - @override_settings(FEATURES={'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': True}) + @override_settings(ENABLE_MAX_FAILED_LOGIN_ATTEMPTS=True) def test_unlock_student_accounts(self): """Test batch unlock student accounts.""" url = reverse('admin:student_loginfailures_changelist') @@ -387,7 +387,7 @@ def test_unlock_student_accounts(self): count = LoginFailures.objects.count() assert count == 0 - @override_settings(FEATURES={'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': True}) + @override_settings(ENABLE_MAX_FAILED_LOGIN_ATTEMPTS=True) def test_unlock_account(self): """Test unlock single student account.""" url = reverse('admin:student_loginfailures_change', args=(1, )) diff --git a/lms/djangoapps/course_api/api.py b/lms/djangoapps/course_api/api.py index 3e7e2e6a0ce3..8cc559377d8c 100644 --- a/lms/djangoapps/course_api/api.py +++ b/lms/djangoapps/course_api/api.py @@ -86,7 +86,7 @@ def _filter_by_search(course_queryset, search_term, mobile_search=False): """ Filters a course queryset by the specified search term. """ - if not settings.FEATURES['ENABLE_COURSEWARE_SEARCH'] or not search_term: + if not settings.ENABLE_COURSEWARE_SEARCH or not search_term: return course_queryset # Return all the results, 10K is the maximum allowed value for ElasticSearch. diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index 85a6d21d3cbd..57b839855dbe 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -2696,7 +2696,8 @@ class AccessUtilsTestCase(ModuleStoreTestCase): }, ) @ddt.unpack - @patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False, 'ENABLE_ENTERPRISE_INTEGRATION': True}) + @override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) + @patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False}) def test_is_course_open_for_learner( self, start_date_modifier, diff --git a/lms/djangoapps/program_enrollments/management/commands/tests/test_send_program_course_nudge_email.py b/lms/djangoapps/program_enrollments/management/commands/tests/test_send_program_course_nudge_email.py index f0326c6402f7..2c46ec20383d 100644 --- a/lms/djangoapps/program_enrollments/management/commands/tests/test_send_program_course_nudge_email.py +++ b/lms/djangoapps/program_enrollments/management/commands/tests/test_send_program_course_nudge_email.py @@ -108,7 +108,7 @@ def enroll_user(self, user, course, create_grade=False): @patch('common.djangoapps.student.models.course_enrollment.segment.track') @patch('lms.djangoapps.program_enrollments.management.commands.send_program_course_nudge_email.get_programs') @patch('lms.djangoapps.certificates.api.certificates_viewable_for_course', return_value=True) - @override_settings(FEATURES=dict(ENABLE_ENTERPRISE_INTEGRATION=True)) + @override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) def test_email_send(self, add_no_commit, __, get_programs_mock, mock_track): # noqa: PT019 """ Test Segment fired as expected. @@ -145,7 +145,7 @@ def test_email_send(self, add_no_commit, __, get_programs_mock, mock_track): # ) @patch('common.djangoapps.student.models.course_enrollment.segment.track') @patch('lms.djangoapps.program_enrollments.management.commands.send_program_course_nudge_email.get_programs') - @override_settings(FEATURES=dict(ENABLE_ENTERPRISE_INTEGRATION=True)) + @override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) def test_email_no_course_recommendation(self, add_no_commit, get_programs_mock, mock_track): """ Test Segment fired as expected. diff --git a/lms/djangoapps/support/tests/test_views.py b/lms/djangoapps/support/tests/test_views.py index 6c551e4e991b..7e2e04ea1f68 100644 --- a/lms/djangoapps/support/tests/test_views.py +++ b/lms/djangoapps/support/tests/test_views.py @@ -400,7 +400,7 @@ def test_order_source_system_information(self): assert len(data) == 1 assert data[0]['source_system'] == 'commercetools' - @override_settings(FEATURES=dict(ENABLE_ENTERPRISE_INTEGRATION=True)) + @override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @enterprise_is_enabled() def test_get_enrollments_enterprise_enabled(self): url = reverse( diff --git a/openedx/core/djangoapps/enrollments/tests/test_views.py b/openedx/core/djangoapps/enrollments/tests/test_views.py index 5ca7a0f7a7c2..4492ad60426d 100644 --- a/openedx/core/djangoapps/enrollments/tests/test_views.py +++ b/openedx/core/djangoapps/enrollments/tests/test_views.py @@ -1237,7 +1237,7 @@ def test_enrollment_with_global_staff_permissions(self, using_global_staff_user, @httpretty.activate @override_settings(ENTERPRISE_SERVICE_WORKER_USERNAME='enterprise_worker', - FEATURES=dict(ENABLE_ENTERPRISE_INTEGRATION=True)) + ENABLE_ENTERPRISE_INTEGRATION=True) @patch('openedx.features.enterprise_support.api.enterprise_customer_from_api') def test_enterprise_course_enrollment_with_ec_uuid(self, mock_enterprise_customer_from_api): """Verify that the enrollment completes when the EnterpriseCourseEnrollment creation succeeds. """ diff --git a/openedx/core/djangoapps/programs/rest_api/v1/tests/test_views.py b/openedx/core/djangoapps/programs/rest_api/v1/tests/test_views.py index 2fbdfd14b6d0..cffa04c77a65 100644 --- a/openedx/core/djangoapps/programs/rest_api/v1/tests/test_views.py +++ b/openedx/core/djangoapps/programs/rest_api/v1/tests/test_views.py @@ -186,7 +186,7 @@ def setUp(self): ) @with_site_configuration(configuration={"COURSE_CATALOG_API_URL": "foo"}) - @override_settings(FEATURES=dict(ENABLE_ENTERPRISE_INTEGRATION=True)) + @override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @enterprise_is_enabled() def test_program_list_enterprise(self): """ @@ -217,7 +217,7 @@ def test_program_list_enterprise(self): } @with_site_configuration(configuration={"COURSE_CATALOG_API_URL": "foo"}) - @override_settings(FEATURES=dict(ENABLE_ENTERPRISE_INTEGRATION=True)) + @override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @enterprise_is_enabled() def test_program_empty_list_if_no_enterprise_enrollments(self): """ diff --git a/openedx/core/djangoapps/user_authn/views/login_form.py b/openedx/core/djangoapps/user_authn/views/login_form.py index 47f21f0adbe1..385e4e3ebfcb 100644 --- a/openedx/core/djangoapps/user_authn/views/login_form.py +++ b/openedx/core/djangoapps/user_authn/views/login_form.py @@ -273,7 +273,7 @@ def login_and_registration_form(request, initial_mode="login"): 'combined_login_and_register': True, 'disable_footer': not configuration_helpers.get_value( 'ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER', - settings.FEATURES['ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER'] + getattr(settings, 'ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER', False) ), } diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_login.py b/openedx/core/djangoapps/user_authn/views/tests/test_login.py index 027d583e6a96..7dc6e848d878 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_login.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_login.py @@ -312,7 +312,7 @@ def test_enterprise_in_url( self._assert_response(response, success=True) self._assert_redirect_url(response, settings.LMS_ROOT_URL + expected_redirect + next_url) - @patch.dict("django.conf.settings.FEATURES", {'SQUELCH_PII_IN_LOGS': True}) + @override_settings(SQUELCH_PII_IN_LOGS=True) def test_login_success_no_pii(self): response, mock_audit_log = self._login_response( self.user_email, self.password, patched_audit_log='common.djangoapps.student.models.user.AUDIT_LOG' @@ -344,7 +344,7 @@ def test_login_fail_no_user_exists(self): ) self._assert_audit_log(mock_audit_log, 'warning', ['Login failed', 'Unknown user email', email_hash]) - @patch.dict("django.conf.settings.FEATURES", {'SQUELCH_PII_IN_LOGS': True}) + @override_settings(SQUELCH_PII_IN_LOGS=True) def test_login_fail_no_user_exists_no_pii(self): nonexistent_email = 'not_a_user@edx.org' response, mock_audit_log = self._login_response( @@ -364,7 +364,7 @@ def test_login_fail_wrong_password(self): self._assert_audit_log(mock_audit_log, 'warning', ['Login failed', 'password for', str(self.user.id), 'invalid']) - @patch.dict("django.conf.settings.FEATURES", {'SQUELCH_PII_IN_LOGS': True}) + @override_settings(SQUELCH_PII_IN_LOGS=True) def test_login_fail_wrong_password_no_pii(self): response, mock_audit_log = self._login_response(self.user_email, 'wrong_password') self._assert_response(response, success=False, value=self.LOGIN_FAILED_WARNING) @@ -534,7 +534,7 @@ def test_unicode_mktg_cookie_names(self): } assert_dict_contains_subset(self, expected, response.context_data) - @patch.dict("django.conf.settings.FEATURES", {'SQUELCH_PII_IN_LOGS': True}) + @override_settings(SQUELCH_PII_IN_LOGS=True) def test_logout_logging_no_pii(self): response, _ = self._login_response(self.user_email, self.password) self._assert_response(response, success=True) @@ -795,7 +795,7 @@ def test_check_password_policy_compliance(self): response_content = json.loads(response.content.decode('utf-8')) assert response_content.get('success') - @patch.dict(settings.FEATURES, {"ENABLE_MAX_FAILED_LOGIN_ATTEMPTS": True}) + @override_settings(ENABLE_MAX_FAILED_LOGIN_ATTEMPTS=True) @override_settings(PASSWORD_POLICY_COMPLIANCE_ROLLOUT_CONFIG={'ENFORCE_COMPLIANCE_ON_LOGIN': True}) def test_check_password_policy_compliance_exception(self): """ diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py index e826aee0e11e..e315c02c4aab 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py @@ -694,7 +694,7 @@ def test_reset_password_with_other_user_link(self): self.assertRaises(Http404, PasswordResetConfirmWrapper.as_view(), reset_request, uidb36=self.uidb36, # noqa: PT027 # pylint: disable=line-too-long token=self.token) - @override_settings(FEATURES={'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': True}, MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED=1) + @override_settings(ENABLE_MAX_FAILED_LOGIN_ATTEMPTS=True, MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED=1) def test_password_reset_with_login_failures_feature_enabled(self): """ Tests that user's login failures lockout counter is reset upon successful password reset. @@ -1013,7 +1013,7 @@ def test_password_reset_api_throttle(self): response = self.client.post(path, request_param) assert response.status_code == 429 - @override_settings(FEATURES={'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': True}, MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED=1) + @override_settings(ENABLE_MAX_FAILED_LOGIN_ATTEMPTS=True, MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED=1) def test_password_reset_request_with_login_failures_feature_enabled(self): """ Tests that user's login failures lockout counter is reset upon successful password reset. diff --git a/openedx/features/enterprise_support/api.py b/openedx/features/enterprise_support/api.py index 4b6a16435fd3..336426509363 100644 --- a/openedx/features/enterprise_support/api.py +++ b/openedx/features/enterprise_support/api.py @@ -328,7 +328,7 @@ def enterprise_enabled(): """ Determines whether the Enterprise app is installed """ - return django_apps.is_installed('enterprise') and settings.FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION', False) + return django_apps.is_installed('enterprise') and getattr(settings, 'ENABLE_ENTERPRISE_INTEGRATION', False) def enterprise_is_enabled(otherwise=None): diff --git a/openedx/features/enterprise_support/tests/__init__.py b/openedx/features/enterprise_support/tests/__init__.py index a3e921a6cd7f..dd037f8721f2 100644 --- a/openedx/features/enterprise_support/tests/__init__.py +++ b/openedx/features/enterprise_support/tests/__init__.py @@ -3,11 +3,6 @@ """ -from django.conf import settings - -FEATURES_WITH_ENTERPRISE_ENABLED = settings.FEATURES.copy() -FEATURES_WITH_ENTERPRISE_ENABLED['ENABLE_ENTERPRISE_INTEGRATION'] = True - FAKE_ENTERPRISE_CUSTOMER = { 'active': True, 'branding_configuration': None, diff --git a/openedx/features/enterprise_support/tests/test_api.py b/openedx/features/enterprise_support/tests/test_api.py index 7f9ab4dd94b5..e1008cce2054 100644 --- a/openedx/features/enterprise_support/tests/test_api.py +++ b/openedx/features/enterprise_support/tests/test_api.py @@ -40,7 +40,6 @@ get_enterprise_learner_data_from_db, get_enterprise_learner_portal_enabled_message, ) -from openedx.features.enterprise_support.tests import FEATURES_WITH_ENTERPRISE_ENABLED from openedx.features.enterprise_support.tests.factories import ( EnterpriseCourseEnrollmentFactory, EnterpriseCustomerIdentityProviderFactory, @@ -59,7 +58,7 @@ def __repr__(self): @ddt.ddt -@override_settings(FEATURES=FEATURES_WITH_ENTERPRISE_ENABLED) +@override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @skip_unless_lms class TestEnterpriseApi(EnterpriseServiceMockMixin, CacheIsolationTestCase): """ @@ -579,7 +578,7 @@ def test_get_dashboard_consent_notification( else: assert notification_string == '' - @override_settings(FEATURES=dict(ENABLE_ENTERPRISE_INTEGRATION=False)) + @override_settings(ENABLE_ENTERPRISE_INTEGRATION=False) def test_utils_with_enterprise_disabled(self): """ Test that disabling the enterprise integration flag causes diff --git a/openedx/features/enterprise_support/tests/test_context.py b/openedx/features/enterprise_support/tests/test_context.py index 07f10a63017a..7004dd80892f 100644 --- a/openedx/features/enterprise_support/tests/test_context.py +++ b/openedx/features/enterprise_support/tests/test_context.py @@ -7,7 +7,6 @@ from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms from openedx.features.enterprise_support.context import get_enterprise_event_context -from openedx.features.enterprise_support.tests import FEATURES_WITH_ENTERPRISE_ENABLED from openedx.features.enterprise_support.tests.factories import ( EnterpriseCourseEnrollmentFactory, EnterpriseCustomerUserFactory, @@ -15,7 +14,7 @@ from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseServiceMockMixin -@override_settings(FEATURES=FEATURES_WITH_ENTERPRISE_ENABLED) +@override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @skip_unless_lms class TestEnterpriseContext(EnterpriseServiceMockMixin, CacheIsolationTestCase): """ diff --git a/openedx/features/enterprise_support/tests/test_logout.py b/openedx/features/enterprise_support/tests/test_logout.py index ee915fe8eb50..2b976d07dbf1 100644 --- a/openedx/features/enterprise_support/tests/test_logout.py +++ b/openedx/features/enterprise_support/tests/test_logout.py @@ -16,14 +16,13 @@ from openedx.features.enterprise_support.api import enterprise_enabled from openedx.features.enterprise_support.tests import ( FAKE_ENTERPRISE_CUSTOMER, - FEATURES_WITH_ENTERPRISE_ENABLED, factories, ) from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseServiceMockMixin @ddt.ddt -@override_settings(FEATURES=FEATURES_WITH_ENTERPRISE_ENABLED) +@override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @skip_unless_lms class EnterpriseLogoutTests(EnterpriseServiceMockMixin, CacheIsolationTestCase, UrlResetMixin): """ Tests for the enterprise logout functionality. """ diff --git a/openedx/features/enterprise_support/tests/test_signals.py b/openedx/features/enterprise_support/tests/test_signals.py index 9bb96a4be918..005fefbd1000 100644 --- a/openedx/features/enterprise_support/tests/test_signals.py +++ b/openedx/features/enterprise_support/tests/test_signals.py @@ -22,7 +22,6 @@ from openedx.core.djangoapps.commerce.utils import ECOMMERCE_DATE_FORMAT from openedx.core.djangoapps.credit.tests.test_api import TEST_ECOMMERCE_WORKER from openedx.core.djangoapps.signals.signals import COURSE_ASSESSMENT_GRADE_CHANGED, COURSE_GRADE_NOW_PASSED -from openedx.features.enterprise_support.tests import FEATURES_WITH_ENTERPRISE_ENABLED from openedx.features.enterprise_support.tests.factories import ( EnterpriseCourseEnrollmentFactory, EnterpriseCustomerFactory, @@ -42,7 +41,7 @@ @ddt.ddt -@override_settings(FEATURES=FEATURES_WITH_ENTERPRISE_ENABLED) +@override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @override_settings(ECOMMERCE_SERVICE_WORKER_USERNAME=TEST_ECOMMERCE_WORKER) class EnterpriseSupportSignals(SharedModuleStoreTestCase): """ diff --git a/openedx/features/enterprise_support/tests/test_utils.py b/openedx/features/enterprise_support/tests/test_utils.py index 4d4c1b57d3f9..d394ab2967ba 100644 --- a/openedx/features/enterprise_support/tests/test_utils.py +++ b/openedx/features/enterprise_support/tests/test_utils.py @@ -21,7 +21,6 @@ from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangolib.testing.utils import skip_unless_lms -from openedx.features.enterprise_support.tests import FEATURES_WITH_ENTERPRISE_ENABLED from openedx.features.enterprise_support.tests.factories import ( EnterpriseCustomerBrandingConfigurationFactory, EnterpriseCustomerFactory, @@ -59,7 +58,7 @@ @ddt.ddt -@override_settings(FEATURES=FEATURES_WITH_ENTERPRISE_ENABLED) +@override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @skip_unless_lms class TestEnterpriseUtils(TestCase): """ @@ -594,7 +593,7 @@ def test_user_has_social_auth_record_no_enterprise_customer(self, mock_tpa, mock assert not mock_user_social_auth.objects.select_related.called -@override_settings(FEATURES=FEATURES_WITH_ENTERPRISE_ENABLED) +@override_settings(ENABLE_ENTERPRISE_INTEGRATION=True) @skip_unless_lms class TestCourseAccessed(SharedModuleStoreTestCase, CompletionWaffleTestMixin): """ diff --git a/xmodule/html_block.py b/xmodule/html_block.py index 0532aef3964d..42126088a076 100644 --- a/xmodule/html_block.py +++ b/xmodule/html_block.py @@ -116,7 +116,7 @@ def student_view_data(self, context=None): # pylint: disable=unused-argument """ Return a JSON representation of the student_view of this XBlock. """ - if getattr(settings, 'FEATURES', {}).get(self.ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA, False): + if getattr(settings, self.ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA, False): return {'enabled': True, 'html': self.get_html()} else: return { diff --git a/xmodule/tests/test_html_block.py b/xmodule/tests/test_html_block.py index e04993d4d2ad..53ca238cbcf6 100644 --- a/xmodule/tests/test_html_block.py +++ b/xmodule/tests/test_html_block.py @@ -33,8 +33,7 @@ def setUpClass(cls): @ddt.data( {}, - dict(FEATURES={}), - dict(FEATURES=dict(ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA=False)) + dict(ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA=False), ) def test_disabled(self, settings): """ @@ -58,7 +57,7 @@ def test_disabled(self, settings): '', # Images allowed 'short string ' * 100, # May contain long strings ) - @override_settings(FEATURES=dict(ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA=True)) + @override_settings(ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA=True) def test_common_values(self, html): """ Ensure that student_view_data will return HTML data when enabled,