'Verify that the function can handle a missing program certificate.'

def test_program_certificate_missing(self, mock_get_credentials):

    expected = []
    for course in self.program['courses']:
        for (index, course_run) in enumerate(course['course_runs']):
            course_run['certificate_url'] = self.course_certificate_url
            if (index == 0):
                expected.append({'type': 'course', 'title': course_run['title'], 'url': self.course_certificate_url})
    mock_get_credentials.return_value = []
    certificates = get_certificates(self.user, self.program)
    self.assertEqual(certificates, expected)
