Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7b6f813
refactor: Remove FEATURES references in openedx/core/djangoapps/conte…
kdmccormick Mar 2, 2026
26ce318
refactor: Remove FEATURES references in cms/djangoapps/cms_user_tasks
kdmccormick Mar 2, 2026
7dd1c43
refactor: Remove FEATURES references in cms/djangoapps/course_creators
kdmccormick Mar 2, 2026
3d3f284
refactor: Remove FEATURES references in cms/djangoapps/models
kdmccormick Mar 2, 2026
24c1143
refactor: Remove FEATURES references in cms/lib/xblock
kdmccormick Mar 2, 2026
dde6303
refactor: Remove FEATURES references in cms/urls.py
kdmccormick Mar 2, 2026
a82ecac
refactor: Remove FEATURES references in common/djangoapps/course_modes
kdmccormick Mar 2, 2026
909630b
refactor: Remove FEATURES references in common/djangoapps/edxmako
kdmccormick Mar 2, 2026
d90cd95
refactor: Remove FEATURES references in common/djangoapps/util
kdmccormick Mar 2, 2026
270c53a
refactor: Remove FEATURES references in common/djangoapps/third_party…
kdmccormick Mar 2, 2026
00e97cb
refactor: Remove FEATURES references in lms/djangoapps/branding
kdmccormick Mar 2, 2026
e00d428
refactor: Remove FEATURES references in lms/djangoapps/ccx
kdmccormick Mar 2, 2026
472389e
refactor: Remove FEATURES references in lms/djangoapps/certificates
kdmccormick Mar 2, 2026
24a4b79
refactor: Remove FEATURES references in lms/djangoapps/commerce
kdmccormick Mar 2, 2026
7443e4d
refactor: Remove FEATURES references in lms/djangoapps/course_blocks
kdmccormick Mar 2, 2026
e639a89
refactor: Remove FEATURES references in lms/djangoapps/course_goals
kdmccormick Mar 2, 2026
e0c3ee5
refactor: Remove FEATURES references in lms/djangoapps/coursewarehist…
kdmccormick Mar 2, 2026
fe8a7bd
refactor: Remove FEATURES references in lms/djangoapps/experiments
kdmccormick Mar 2, 2026
65955c2
refactor: Remove FEATURES references in lms/djangoapps/course_home_api
kdmccormick Mar 2, 2026
1d64468
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
e5f1e7d
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
58e3f80
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
c3769a9
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
e6cc1a0
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
c0d1488
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
5e7fcf2
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
69a5eff
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
7598988
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
0a4c207
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
36214fa
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
4f7dd18
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
db62bd3
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
80ce03e
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
1d79d93
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
9c43cc6
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
907466c
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
3962298
temp: Empty commit indicating no FEATURES references in lms/djangoapp…
kdmccormick Mar 2, 2026
eb7ad7f
refactor: Remove FEATURES references in lms/djangoapps/course_api
kdmccormick Mar 2, 2026
fce43b3
refactor: Remove FEATURES references in lms/djangoapps/course_wiki
kdmccormick Mar 2, 2026
46133d8
refactor: Remove FEATURES references in lms/djangoapps/courseware
kdmccormick Mar 2, 2026
bad2407
refactor: Remove FEATURES references in lms/djangoapps/edxnotes
kdmccormick Mar 2, 2026
29a20f6
refactor: Remove FEATURES references in lms/djangoapps/discussion
kdmccormick Mar 2, 2026
37cd477
refactor: Remove FEATURES references in lms/djangoapps/grades
kdmccormick Mar 2, 2026
7a94c2a
temp: fail fast false
kdmccormick Mar 2, 2026
02c1f7c
fix: Define ENABLE_THIRD_PARTY_AUTH setting for CMS too
kdmccormick Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
name: ${{ matrix.shard_name }}(py=${{ matrix.python-version }},dj=${{ matrix.django-version }},mongo=${{ matrix.mongo-version }})
runs-on: ${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
Expand Down
6 changes: 3 additions & 3 deletions cms/djangoapps/cms_user_tasks/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def test_email_sent_with_olx_validations_with_config_enabled(self):
*self.olx_validations['warnings']
]

with patch.dict(settings.FEATURES, ENABLE_COURSE_OLX_VALIDATION=True):
with override_settings(ENABLE_COURSE_OLX_VALIDATION=True):
user_task_stopped.send(sender=UserTaskStatus, status=self.status)
msg = mail.outbox[0]

Expand All @@ -277,12 +277,12 @@ def test_email_sent_with_olx_validations_with_default_config(self):
msg = mail.outbox[0]

# Verify olx validation is not enabled out of the box.
self.assertFalse(settings.FEATURES.get('ENABLE_COURSE_OLX_VALIDATION'))
self.assertFalse(settings.ENABLE_COURSE_OLX_VALIDATION)
self.assertEqual(len(mail.outbox), 1)
self.assert_msg_subject(msg)
self.assert_msg_body_fragments(msg, body_fragments)

@patch.dict(settings.FEATURES, ENABLE_COURSE_OLX_VALIDATION=True)
@override_settings(ENABLE_COURSE_OLX_VALIDATION=True)
@override_waffle_flag(BYPASS_OLX_FAILURE, active=True)
def test_email_sent_with_olx_validations_with_bypass_flag(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions cms/djangoapps/course_creators/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def send_user_notification_callback(sender, **kwargs): # pylint: disable=unused
user = kwargs['user']
updated_state = kwargs['state']

studio_request_email = settings.FEATURES.get('STUDIO_REQUEST_EMAIL', '')
studio_request_email = settings.STUDIO_REQUEST_EMAIL
context = {'studio_request_email': studio_request_email}

subject = render_to_string('emails/course_creator_subject.txt', context)
Expand All @@ -169,7 +169,7 @@ def send_admin_notification_callback(sender, **kwargs): # pylint: disable=unuse
"""
user = kwargs['user']

studio_request_email = settings.FEATURES.get('STUDIO_REQUEST_EMAIL', '')
studio_request_email = settings.STUDIO_REQUEST_EMAIL
context = {'user_name': user.username, 'user_email': user.email}

subject = render_to_string('emails/course_creator_admin_subject.txt', context)
Expand Down
10 changes: 3 additions & 7 deletions cms/djangoapps/course_creators/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.contrib.admin.sites import AdminSite
from django.core import mail
from django.http import HttpRequest
from django.test import TestCase
from django.test import TestCase, override_settings

from cms.djangoapps.course_creators.admin import CourseCreatorAdmin
from cms.djangoapps.course_creators.models import CourseCreator
Expand Down Expand Up @@ -51,10 +51,6 @@ def setUp(self):
self.creator_admin = CourseCreatorAdmin(self.table_entry, AdminSite())

self.studio_request_email = 'mark@marky.mark'
self.enable_creator_group_patch = {
"ENABLE_CREATOR_GROUP": True,
"STUDIO_REQUEST_EMAIL": self.studio_request_email
}

@mock.patch(
'cms.djangoapps.course_creators.admin.render_to_string',
Expand Down Expand Up @@ -84,7 +80,7 @@ def change_state_and_verify_email(state, is_creator):
self.studio_request_email
)

with mock.patch.dict('django.conf.settings.FEATURES', self.enable_creator_group_patch):
with override_settings(ENABLE_CREATOR_GROUP=True, STUDIO_REQUEST_EMAIL=self.studio_request_email):

# User is initially unrequested.
self.assertFalse(auth.user_has_role(self.user, CourseCreatorRole()))
Expand Down Expand Up @@ -138,7 +134,7 @@ def check_admin_message_state(state, expect_sent_to_admin, expect_sent_to_user):
else:
self.assertEqual(base_num_emails, len(mail.outbox))

with mock.patch.dict('django.conf.settings.FEATURES', self.enable_creator_group_patch):
with override_settings(ENABLE_CREATOR_GROUP=True, STUDIO_REQUEST_EMAIL=self.studio_request_email):
# E-mail message should be sent to admin only when new state is PENDING, regardless of what
# previous state was (unless previous state was already PENDING).
# E-mail message sent to user only on transition into and out of GRANTED state.
Expand Down
8 changes: 4 additions & 4 deletions cms/djangoapps/course_creators/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from unittest import mock

from django.core.exceptions import PermissionDenied
from django.test import TestCase
from django.test import TestCase, override_settings
from django.urls import reverse

from cms.djangoapps.course_creators.views import (
Expand Down Expand Up @@ -65,7 +65,7 @@ def test_add_unrequested(self):
self.assertEqual('unrequested', get_course_creator_status(self.user))

def test_add_granted(self):
with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}):
with override_settings(ENABLE_CREATOR_GROUP=True):
# Calling add_user_with_status_granted impacts is_user_in_course_group_role.
self.assertFalse(auth.user_has_role(self.user, CourseCreatorRole()))

Expand All @@ -79,15 +79,15 @@ def test_add_granted(self):
self.assertTrue(auth.user_has_role(self.user, CourseCreatorRole()))

def test_update_creator_group(self):
with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}):
with override_settings(ENABLE_CREATOR_GROUP=True):
self.assertFalse(auth.user_has_role(self.user, CourseCreatorRole()))
update_course_creator_group(self.admin, self.user, True)
self.assertTrue(auth.user_has_role(self.user, CourseCreatorRole()))
update_course_creator_group(self.admin, self.user, False)
self.assertFalse(auth.user_has_role(self.user, CourseCreatorRole()))

def test_update_org_content_creator_role(self):
with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}):
with override_settings(ENABLE_CREATOR_GROUP=True):
self.assertFalse(auth.user_has_role(self.user, OrgContentCreatorRole(self.org)))
update_org_content_creator_role(self.admin, self.user, [self.org])
self.assertTrue(auth.user_has_role(self.user, OrgContentCreatorRole(self.org)))
Expand Down
14 changes: 7 additions & 7 deletions cms/djangoapps/models/settings/course_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ def get_exclude_list_of_fields(cls, course_key):
exclude_list.append('giturl')

# Do not show edxnotes if the feature is disabled.
if not settings.FEATURES.get('ENABLE_EDXNOTES'):
if not settings.ENABLE_EDXNOTES:
exclude_list.append('edxnotes')

# Do not show video auto advance if the feature is disabled
if not settings.FEATURES.get('ENABLE_OTHER_COURSE_SETTINGS'):
if not settings.ENABLE_OTHER_COURSE_SETTINGS:
exclude_list.append('other_course_settings')

# Do not show video_upload_pipeline if the feature is disabled.
if not settings.FEATURES.get('ENABLE_VIDEO_UPLOAD_PIPELINE'):
if not settings.ENABLE_VIDEO_UPLOAD_PIPELINE:
exclude_list.append('video_upload_pipeline')

# Do not show video auto advance if the feature is disabled
if not settings.FEATURES.get('ENABLE_AUTOADVANCE_VIDEOS'):
if not settings.ENABLE_AUTOADVANCE_VIDEOS:
exclude_list.append('video_auto_advance')

# Do not show social sharing url field if the feature is disabled.
Expand All @@ -124,14 +124,14 @@ def get_exclude_list_of_fields(cls, course_key):
exclude_list.append('social_sharing_url')

# Do not show teams configuration if feature is disabled.
if not settings.FEATURES.get('ENABLE_TEAMS'):
if not settings.ENABLE_TEAMS:
exclude_list.append('teams_configuration')

if not settings.FEATURES.get('ENABLE_VIDEO_BUMPER'):
if not settings.ENABLE_VIDEO_BUMPER:
exclude_list.append('video_bumper')

# Do not show enable_ccx if feature is not enabled.
if not settings.FEATURES.get('CUSTOM_COURSES_EDX'):
if not settings.CUSTOM_COURSES_EDX:
exclude_list.append('enable_ccx')
exclude_list.append('ccx_connector')

Expand Down
5 changes: 1 addition & 4 deletions cms/lib/xblock/test/test_authoring_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
ENROLLMENT_GROUPS_TITLE = "Enrollment Track Groups"
STAFF_LOCKED = 'The unit that contains this component is hidden from learners'

FEATURES_WITH_ENROLLMENT_TRACK_DISABLED = settings.FEATURES.copy()
FEATURES_WITH_ENROLLMENT_TRACK_DISABLED['ENABLE_ENROLLMENT_TRACK_USER_PARTITION'] = False

@XBlock.register_temp_plugin(PureXBlock, 'pure')
def setUp(self):
"""
Expand Down Expand Up @@ -170,7 +167,7 @@ def test_html_false_content_group(self):
[self.STAFF_LOCKED]
)

@override_settings(FEATURES=FEATURES_WITH_ENROLLMENT_TRACK_DISABLED)
@override_settings(ENABLE_ENROLLMENT_TRACK_USER_PARTITION=False)
def test_enrollment_tracks_disabled(self):
"""
Test that the "no groups" messages doesn't reference enrollment tracks if
Expand Down
6 changes: 3 additions & 3 deletions cms/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@
name='export_git')
]

if settings.FEATURES.get('ENABLE_SERVICE_STATUS'):
if settings.ENABLE_SERVICE_STATUS:
urlpatterns.append(path('status/', include('openedx.core.djangoapps.service_status.urls')))

# The password pages in the admin tool are disabled so that all password
# changes go through our user portal and follow complexity requirements.
if not settings.FEATURES.get('ENABLE_CHANGE_USER_PASSWORD_ADMIN'):
if not settings.ENABLE_CHANGE_USER_PASSWORD_ADMIN:
urlpatterns.append(re_path(r'^admin/auth/user/\d+/password/$', handler404))
urlpatterns.append(path('admin/password_change/', handler404))
urlpatterns.append(
Expand All @@ -264,7 +264,7 @@
contentstore_views.entrance_exam))

# Enable Web/HTML Certificates
if settings.FEATURES.get('CERTIFICATES_HTML_VIEW'):
if settings.CERTIFICATES_HTML_VIEW:
from cms.djangoapps.contentstore.views.certificates import (
CertificateActivationAPIView,
CertificateDetailAPIView,
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/course_modes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ def is_eligible_for_certificate(cls, mode_slug, status=None):
"""
ineligible_modes = [cls.AUDIT]

if settings.FEATURES.get('DISABLE_HONOR_CERTIFICATES', False):
if settings.DISABLE_HONOR_CERTIFICATES:
# Adding check so that we can regenerate the certificate for learners who have
# already earned the certificate using honor mode
from lms.djangoapps.certificates.data import CertificateStatuses
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/course_modes/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def test_expiration_datetime_explicitly_set_to_none(self):
@ddt.unpack
def test_eligible_for_cert(self, disable_honor_cert, mode_slug, expected_eligibility):
"""Verify that non-audit modes are eligible for a cert."""
with override_settings(FEATURES={'DISABLE_HONOR_CERTIFICATES': disable_honor_cert}):
with override_settings(DISABLE_HONOR_CERTIFICATES=disable_honor_cert):
assert CourseMode.is_eligible_for_certificate(mode_slug) == expected_eligibility

@ddt.data(
Expand Down
6 changes: 3 additions & 3 deletions common/djangoapps/course_modes/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CourseModeViewTest(CatalogIntegrationMixin, UrlResetMixin, ModuleStoreTest
"""
URLCONF_MODULES = ['common.djangoapps.course_modes.urls']

@patch.dict(settings.FEATURES, {'MODE_CREATION_FOR_TESTING': True})
@override_settings(MODE_CREATION_FOR_TESTING=True)
def setUp(self):
super().setUp()
now = datetime.now(ZoneInfo("UTC"))
Expand Down Expand Up @@ -640,7 +640,7 @@ class TrackSelectionEmbargoTest(UrlResetMixin, ModuleStoreTestCase):

URLCONF_MODULES = ['openedx.core.djangoapps.embargo']

@patch.dict(settings.FEATURES, {'EMBARGO': True})
@override_settings(EMBARGO=True)
def setUp(self):
super().setUp()

Expand All @@ -656,7 +656,7 @@ def setUp(self):
# Construct the URL for the track selection page
self.url = reverse('course_modes_choose', args=[str(self.course.id)])

@patch.dict(settings.FEATURES, {'EMBARGO': True})
@override_settings(EMBARGO=True)
def test_embargo_restrict(self):
with restrict_course(self.course.id) as redirect_url:
response = self.client.get(self.url)
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/course_modes/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]

# Enable verified mode creation
if settings.FEATURES.get('MODE_CREATION_FOR_TESTING'):
if settings.MODE_CREATION_FOR_TESTING:
urlpatterns.append(
re_path(fr'^create_mode/{settings.COURSE_ID_PATTERN}/$',
views.create_mode,
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/course_modes/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def _redirect_to_course_or_dashboard(self, course, course_key, user):
def create_mode(request, course_id):
"""Add a mode to the course corresponding to the given course ID.

Only available when settings.FEATURES['MODE_CREATION_FOR_TESTING'] is True.
Only available when settings.MODE_CREATION_FOR_TESTING is True.

Attempts to use the following querystring parameters from the request:
`mode_slug` (str): The mode to add, either 'honor', 'verified', or 'professional'
Expand Down
4 changes: 2 additions & 2 deletions common/djangoapps/edxmako/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def marketing_link(name):
link_map = settings.MKTG_URL_LINK_MAP
enable_mktg_site = configuration_helpers.get_value(
'ENABLE_MKTG_SITE',
settings.FEATURES.get('ENABLE_MKTG_SITE', False)
settings.ENABLE_MKTG_SITE
)
marketing_urls = configuration_helpers.get_value(
'MKTG_URLS',
Expand Down Expand Up @@ -115,7 +115,7 @@ def is_marketing_link_set(name):

enable_mktg_site = configuration_helpers.get_value(
'ENABLE_MKTG_SITE',
settings.FEATURES.get('ENABLE_MKTG_SITE', False)
settings.ENABLE_MKTG_SITE
)
marketing_urls = configuration_helpers.get_value(
'MKTG_URLS',
Expand Down
22 changes: 11 additions & 11 deletions common/djangoapps/edxmako/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class ShortcutsTests(UrlResetMixin, TestCase):
def test_marketing_link(self):
with override_settings(MKTG_URL_LINK_MAP={'ABOUT': self._get_test_url_name()}):
# test marketing site on
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}):
with override_settings(ENABLE_MKTG_SITE=True):
expected_link = 'https://dummy-root/about-us'
link = marketing_link('ABOUT')
assert link == expected_link
# test marketing site off
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}):
with override_settings(ENABLE_MKTG_SITE=False):
expected_link = reverse(self._get_test_url_name())
link = marketing_link('ABOUT')
assert link == expected_link
Expand All @@ -49,24 +49,24 @@ def test_marketing_link(self):
def test_is_marketing_link_set(self):
with override_settings(MKTG_URL_LINK_MAP={'ABOUT': self._get_test_url_name()}):
# test marketing site on
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}):
with override_settings(ENABLE_MKTG_SITE=True):
assert is_marketing_link_set('ABOUT')
assert not is_marketing_link_set('NOT_CONFIGURED')
# test marketing site off
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}):
with override_settings(ENABLE_MKTG_SITE=False):
assert is_marketing_link_set('ABOUT')
assert not is_marketing_link_set('NOT_CONFIGURED')

@override_settings(MKTG_URLS={'ROOT': 'https://dummy-root', 'ABOUT': '/about-us'})
def test_is_any_marketing_link_set(self):
with override_settings(MKTG_URL_LINK_MAP={'ABOUT': self._get_test_url_name()}):
# test marketing site on
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}):
with override_settings(ENABLE_MKTG_SITE=True):
assert is_any_marketing_link_set(['ABOUT'])
assert is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED'])
assert not is_any_marketing_link_set(['NOT_CONFIGURED'])
# test marketing site off
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}):
with override_settings(ENABLE_MKTG_SITE=False):
assert is_any_marketing_link_set(['ABOUT'])
assert is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED'])
assert not is_any_marketing_link_set(['NOT_CONFIGURED'])
Expand All @@ -84,11 +84,11 @@ def _get_test_url_name(self): # lint-amnesty, pylint: disable=missing-function-
def test_override_marketing_link_valid(self):
expected_link = 'https://edx.org'
# test marketing site on
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}):
with override_settings(ENABLE_MKTG_SITE=True):
link = marketing_link('TOS')
assert link == expected_link
# test marketing site off
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}):
with override_settings(ENABLE_MKTG_SITE=False):
link = marketing_link('TOS')
assert link == expected_link

Expand All @@ -97,11 +97,11 @@ def test_override_marketing_link_valid(self):
def test_override_marketing_link_invalid(self):
expected_link = '#'
# test marketing site on
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}):
with override_settings(ENABLE_MKTG_SITE=True):
link = marketing_link('TOS')
assert link == expected_link
# test marketing site off
with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}):
with override_settings(ENABLE_MKTG_SITE=False):
link = marketing_link('TOS')
assert link == expected_link

Expand All @@ -112,7 +112,7 @@ def test_link_map_url_reverse(self):
'BAD_URL': 'foobarbaz',
}

with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}):
with override_settings(ENABLE_MKTG_SITE=False):
with override_settings(MKTG_URL_LINK_MAP=url_link_map):
link = marketing_link('ABOUT')
assert link == '/dashboard'
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/third_party_auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def is_enabled():

return configuration_helpers.get_value(
"ENABLE_THIRD_PARTY_AUTH",
settings.FEATURES.get("ENABLE_THIRD_PARTY_AUTH")
settings.ENABLE_THIRD_PARTY_AUTH
)
2 changes: 1 addition & 1 deletion common/djangoapps/third_party_auth/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def ready(self):
from .signals import handlers # noqa: F401 pylint: disable=unused-import

# To override the settings before loading social_django.
if settings.FEATURES.get('ENABLE_THIRD_PARTY_AUTH', False):
if settings.ENABLE_THIRD_PARTY_AUTH:
self._enable_third_party_auth()

def _enable_third_party_auth(self):
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/third_party_auth/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def wrapped_view(request, *args, **kwargs):
""" Modify the response with the correct X-Frame-Options. """
resp = view_func(request, *args, **kwargs)
x_frame_option = settings.X_FRAME_OPTIONS
if settings.FEATURES['ENABLE_THIRD_PARTY_AUTH']:
if settings.ENABLE_THIRD_PARTY_AUTH:
referer = request.META.get('HTTP_REFERER')
if referer is not None:
parsed_url = urlparse(referer)
Expand Down
Loading
Loading