'Create certificate for the course.'

def _add_course_certificates(self, count=1, signatory_count=0, is_active=False, asset_path_format=C4X_SIGNATORY_PATH):

    signatories = [{'name': ('Name    ' + str(i)), 'title': ('Title    ' + str(i)), 'signature_image_path': asset_path_format.format(i), 'id': i} for i in xrange(signatory_count)]
    self._create_fake_images((signatory['signature_image_path'] for signatory in signatories[:(-1)]))
    certificates = [{'id': i, 'name': ('Name    ' + str(i)), 'description': ('Description    ' + str(i)), 'signatories': signatories, 'version': CERTIFICATE_SCHEMA_VERSION, 'is_active': is_active} for i in xrange(count)]
    self.course.certificates = {'certificates': certificates}
    self.save_course()
