'Verify that for pdf certs if certificate is marked as invalidated than
re-generate button should not appear on progress page.'

@patch('lms.djangoapps.grades.new.course_grade.CourseGrade.summary', PropertyMock(return_value={'grade': 'Pass', 'percent': 0.75, 'section_breakdown': [], 'grade_breakdown': {}}))
def test_page_with_invalidated_certificate_with_pdf(self):

    generated_certificate = self.generate_certificate('http://www.example.com/certificate.pdf', 'honor')
    resp = self._get_progress_page()
    self.assertContains(resp, u'Download    Your    Certificate')
    self.assert_invalidate_certificate(generated_certificate)
