'Verify that method return true if certificate is invalid.'

def test_is_certificate_invalid_with_invalid_cert(self):

    invalid_cert = CertificateInvalidationFactory.create(generated_certificate=self.certificate, invalidated_by=self.user)
    self.certificate.invalidate()
    self.assertTrue(CertificateInvalidation.has_certificate_invalidation(self.user, self.course_id))
    invalid_cert.active = False
    invalid_cert.save()
    self.assertFalse(CertificateInvalidation.has_certificate_invalidation(self.user, self.course_id))
