'Checks that the Credentials API is used to award certificates for
the proper programs.'

@ddt.data(([1], [2, 3]), ([], [1, 2, 3]), ([1, 2, 3], []))
@ddt.unpack
def test_awarding_certs(self, already_awarded_program_uuids, expected_awarded_program_uuids, mock_get_completed_programs, mock_get_certified_programs, mock_award_program_certificate):

    mock_get_completed_programs.return_value = [1, 2, 3]
    mock_get_certified_programs.return_value = already_awarded_program_uuids
    tasks.award_program_certificates.delay(self.student.username).get()
    actual_program_uuids = [call[0][2] for call in mock_award_program_certificate.call_args_list]
    self.assertEqual(actual_program_uuids, expected_awarded_program_uuids)
