'Verify the task can handle both professional and no-id-professional modes.'

def test_handle_professional(self, mock_task, mock_get_programs):

    mock_get_programs.return_value = [ProgramFactory(courses=[CourseFactory(course_runs=[CourseRunFactory(key=self.course_run_key, type='professional')])])]
    GeneratedCertificateFactory(user=self.alice, course_id=self.course_run_key, mode=CourseMode.PROFESSIONAL, status=CertificateStatuses.downloadable)
    GeneratedCertificateFactory(user=self.bob, course_id=self.course_run_key, mode=CourseMode.NO_ID_PROFESSIONAL_MODE, status=CertificateStatuses.downloadable)
    call_command('backpopulate_program_credentials', commit=True)
    mock_task.assert_has_calls([mock.call(self.alice.username), mock.call(self.bob.username)])
