'Ensures that any otherwise-unhandled errors that arise while trying
to get completed programs (e.g. network issues or other
transient API errors) will cause the task to be failed and queued for
retry.'

def test_retry_on_programs_api_errors(self, mock_get_completed_programs, *_mock_helpers):

    mock_get_completed_programs.side_effect = self._make_side_effect([Exception('boom'), None])
    tasks.award_program_certificates.delay(self.student.username).get()
    self.assertEqual(mock_get_completed_programs.call_count, 3)
