'If certificate web view is disabled then certificate web view button should not appear for user who certificate
is available/generated'

@patch.dict('django.conf.settings.FEATURES', {'CERTIFICATES_HTML_VIEW': False})
@patch('lms.djangoapps.grades.new.course_grade.CourseGrade.summary', PropertyMock(return_value={'grade': 'Pass', 'percent': 0.75, 'section_breakdown': [], 'grade_breakdown': {}}))
def test_view_certificate_link_hidden(self):

    GeneratedCertificateFactory.create(user=self.user, course_id=self.course.id, status=CertificateStatuses.downloadable, download_url='http://www.example.com/certificate.pdf', mode='honor')
    CertificateGenerationConfiguration(enabled=True).save()
    certs_api.set_cert_generation_enabled(self.course.id, True)
    resp = self._get_progress_page()
    self.assertContains(resp, u'Download    Your    Certificate')
