Remove unused "has_cert_config" field on CourseDetails.
This commit is contained in:
@@ -982,40 +982,6 @@ class CourseMetadataEditingTest(CourseTestCase):
|
||||
tab_list.append(self.notes_tab)
|
||||
self.assertEqual(tab_list, course.tabs)
|
||||
|
||||
@override_settings(FEATURES={'CERTIFICATES_HTML_VIEW': True})
|
||||
def test_web_view_certificate_configuration_settings(self):
|
||||
"""
|
||||
Test that has_cert_config is updated based on cert_html_view_enabled setting.
|
||||
"""
|
||||
test_model = CourseMetadata.update_from_json(
|
||||
self.course,
|
||||
{
|
||||
"cert_html_view_enabled": {"value": "true"}
|
||||
},
|
||||
user=self.user
|
||||
)
|
||||
self.assertIn('cert_html_view_enabled', test_model)
|
||||
url = get_url(self.course.id)
|
||||
response = self.client.get_json(url)
|
||||
course_detail_json = json.loads(response.content)
|
||||
self.assertFalse(course_detail_json['has_cert_config'])
|
||||
|
||||
# Now add a certificate configuration
|
||||
certificates = [
|
||||
{
|
||||
'id': 1,
|
||||
'name': 'Certificate Config Name',
|
||||
'course_title': 'Title override',
|
||||
'signatories': [],
|
||||
'is_active': True
|
||||
}
|
||||
]
|
||||
self.course.certificates = {'certificates': certificates}
|
||||
modulestore().update_item(self.course, self.user.id)
|
||||
response = self.client.get_json(url)
|
||||
course_detail_json = json.loads(response.content)
|
||||
self.assertTrue(course_detail_json['has_cert_config'])
|
||||
|
||||
|
||||
class CourseGraderUpdatesTest(CourseTestCase):
|
||||
"""
|
||||
|
||||
@@ -31,8 +31,7 @@ define([
|
||||
entrance_exam_enabled : '',
|
||||
entrance_exam_minimum_score_pct: '50',
|
||||
license: null,
|
||||
language: '',
|
||||
has_cert_config: false
|
||||
language: ''
|
||||
},
|
||||
mockSettingsPage = readFixtures('mock/mock-settings-page.underscore');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user