'Verify that invalidated cert data is returned if cert is invalidated.'

def test_invalidated_cert_data(self):

    generated_certificate = self.generate_certificate('http://www.example.com/certificate.pdf', 'honor')
    CertificateInvalidationFactory.create(generated_certificate=generated_certificate, invalidated_by=self.user)
    generated_certificate.invalidate()
    response = views._get_cert_data(self.user, self.course, self.course.id, True, CourseMode.HONOR)
    self.assertEqual(response.cert_status, 'invalidated')
    self.assertEqual(response.title, 'Your    certificate    has    been    invalidated')
