'Test certificates generations for honor and audit modes.'

@ddt.data('honor', 'audit')
@override_settings(AUDIT_CERT_CUTOFF_DATE=(datetime.now(pytz.UTC) - timedelta(days=1)))
def test_add_cert_with_honor_certificates(self, mode):

    template_name = 'certificate-template-{id.org}-{id.course}.pdf'.format(id=self.course.id)
    mock_send = self.add_cert_to_queue(mode)
    if CourseMode.is_eligible_for_certificate(mode):
        self.assert_certificate_generated(mock_send, mode, template_name)
    else:
        self.assert_ineligible_certificate_generated(mock_send, mode)
