Skip to content

Commit

Permalink
fix: update tests to use the new course authoring setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bra-i-am committed Feb 28, 2024
1 parent 32d9485 commit 17e63b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cms/djangoapps/contentstore/views/tests/test_course_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,10 @@ def test_verify_warn_only_on_enabled_blocks(self, enabled_block_types, deprecate
expected_block_types
)

@override_settings(FEATURES={'ENABLE_EXAM_SETTINGS_HTML_VIEW': True})
@override_settings(
ENABLE_COURSE_AUTHORING_MFE=True,
FEATURES={'ENABLE_EXAM_SETTINGS_HTML_VIEW': True}
)
@patch('cms.djangoapps.models.settings.course_metadata.CourseMetadata.validate_proctoring_settings')
def test_proctoring_link_is_visible(self, mock_validate_proctoring_settings):
"""
Expand Down
13 changes: 11 additions & 2 deletions cms/djangoapps/contentstore/views/tests/test_exam_settings_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
FEATURES_WITH_EXAM_SETTINGS_DISABLED['ENABLE_EXAM_SETTINGS_HTML_VIEW'] = False
FEATURES_WITH_EXAM_SETTINGS_DISABLED['ENABLE_PROCTORED_EXAMS'] = True

ENABLE_COURSE_AUTHORING_MFE = True


@ddt.ddt
class TestExamSettingsView(CourseTestCase, UrlResetMixin):
Expand Down Expand Up @@ -64,7 +66,10 @@ def test_view_without_exam_settings_enabled(self, handler):
self.assertEqual(resp.status_code, 200)
self.assertNotContains(resp, 'Proctored Exam Settings')

@override_settings(FEATURES=FEATURES_WITH_EXAM_SETTINGS_ENABLED)
@override_settings(
ENABLE_COURSE_AUTHORING_MFE=ENABLE_COURSE_AUTHORING_MFE,
FEATURES=FEATURES_WITH_EXAM_SETTINGS_ENABLED
)
@ddt.data(
"certificates_list_handler",
"settings_handler",
Expand All @@ -87,6 +92,7 @@ def test_view_with_exam_settings_enabled(self, handler):
'DEFAULT': 'test_proctoring_provider',
'proctortrack': {}
},
ENABLE_COURSE_AUTHORING_MFE=ENABLE_COURSE_AUTHORING_MFE,
FEATURES=FEATURES_WITH_EXAM_SETTINGS_ENABLED,
)
@ddt.data(
Expand Down Expand Up @@ -179,7 +185,10 @@ def test_exam_settings_alert_not_shown(self, page_handler):
alert_nodes = parsed_html.find_class('exam-settings-alert')
assert len(alert_nodes) == 0

@override_settings(FEATURES={'ENABLE_EXAM_SETTINGS_HTML_VIEW': True})
@override_settings(
ENABLE_COURSE_AUTHORING_MFE=ENABLE_COURSE_AUTHORING_MFE,
FEATURES={'ENABLE_EXAM_SETTINGS_HTML_VIEW': True}
)
@patch('cms.djangoapps.models.settings.course_metadata.CourseMetadata.validate_proctoring_settings')
def test_proctoring_link_is_visible(self, mock_validate_proctoring_settings):

Expand Down

0 comments on commit 17e63b1

Please sign in to comment.