'Tests that Certificate HTML Web View returns "Cannot Find Certificate" if certificate has been invalidated.'

@override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED)
def test_html_view_for_invalid_certificate(self):

    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)
    self.assertIn(str(self.cert.verify_uuid), response.content)
    self.cert.invalidate()
    response = self.client.get(test_url)
    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)
