Fix PDF cert gereration/regeneration and URLs.

Since cert_html_view_enabled is deprecated and set default true,
PDF certificates are not appearing for learners and staff also
unable to regenerate them.

LEARNER-4520
This commit is contained in:
Waheed Ahmed
2018-05-30 17:45:17 +05:00
parent 783aca5559
commit baf3e594be
8 changed files with 56 additions and 23 deletions

View File

@@ -1002,6 +1002,20 @@ class TestProgramDataExtender(ModuleStoreTestCase):
Verify that the student's run mode certificate is included,
when available.
"""
certificates = [
{
'id': 1,
'name': 'Test Certificate Name',
'description': 'Test Certificate Description',
'course_title': 'tes_course_title',
'signatories': [],
'version': 1,
'is_active': True
}
]
self.course.certificates = {'certificates': certificates}
self.course = self.update_course(self.course, self.user.id)
test_uuid = uuid.uuid4().hex
mock_get_cert_data.return_value = {'uuid': test_uuid} if is_uuid_available else {}
mock_html_certs_enabled.return_value = True