Merge pull request #18285 from edx/waheed/LEARNER-4520-fix-pdf-certificates

Fix PDF cert gereration/regeneration and URLs.
This commit is contained in:
Waheed Ahmed
2018-06-06 15:36:52 +05:00
committed by GitHub
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