'Verify that the method can find course run certificates when not mocked out.'

@mock.patch((UTILS_MODULE + '.certificate_api.get_certificates_for_user'))
def test_completed_course_runs(self, mock_get_certificates_for_user, _mock_get_programs):

    mock_get_certificates_for_user.return_value = [self._make_certificate_result(status='downloadable', type='verified', course_key='downloadable-course'), self._make_certificate_result(status='generating', type='honor', course_key='generating-course'), self._make_certificate_result(status='unknown', course_key='unknown-course')]
    meter = ProgramProgressMeter(self.site, self.user)
    self.assertEqual(meter.completed_course_runs, [{'course_run_id': 'downloadable-course', 'type': 'verified'}, {'course_run_id': 'generating-course', 'type': 'honor'}])
    mock_get_certificates_for_user.assert_called_with(self.user.username)
