'Verify that \'no-id-professional\' certificates are treated as if they were
\'professional\' certificates when determining program completion.'

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

    course_runs = CourseRunFactory.create_batch(2, type='professional')
    program = ProgramFactory(courses=[CourseFactory(course_runs=course_runs)])
    mock_get_programs.return_value = [program]
    meter = ProgramProgressMeter(self.site, self.user)
    self.assertEqual(meter.completed_programs, [])
    mock_get_certificates_for_user.return_value = [self._make_certificate_result(status='downloadable', type='no-id-professional', course_key=course_runs[0]['key'])]
    meter = ProgramProgressMeter(self.site, self.user)
    self.assertEqual(meter.completed_programs, [program['uuid']])
