'Ensure that audit-mode certs are only shown in the web view if they
are eligible for a certificate.'

@ddt.data((CertificateStatuses.downloadable, True), (CertificateStatuses.audit_passing, False), (CertificateStatuses.audit_notpassing, False))
@ddt.unpack
@override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED)
def test_audit_certificate_display(self, status, eligible_for_certificate):

    self.cert.mode = 'audit'
    self.cert.status = status
    self.cert.save()
    self._add_course_certificates(count=1, signatory_count=2)
    test_url = get_certificate_url(user_id=self.user.id, course_id=unicode(self.course.id))
    response = self.client.get(test_url)
    if eligible_for_certificate:
        self.assertIn(str(self.cert.verify_uuid), response.content)
    else:
        self.assertIn('Invalid    Certificate', response.content)
        self.assertIn('Cannot    Find    Certificate', response.content)
        self.assertIn('We    cannot    find    a    certificate    with    this    URL    or    ID    number.', response.content)
        self.assertNotIn(str(self.cert.verify_uuid), response.content)
