def METHOD_NAME(self, api, mocker, time_mock, update_job_mock):
    """Manager should restart failed jobs"""
    def update_job_behaviour():
        jobs[1].failed = True
        yield
        jobs[1].failed = False
        jobs[1].completed = True
        yield
    update_job_mock.side_effect = update_job_behaviour()
    jobs = [
        mocker.Mock(spec=InsightAsyncJob, attempt_number=1, failed=False, completed=True),
        mocker.Mock(spec=InsightAsyncJob, attempt_number=1, failed=False, completed=False),
    ]
    manager = InsightAsyncJobManager(api=api, jobs=jobs)
    job = next(manager.completed_jobs(), None)
    assert job == jobs[0]
    jobs[1].restart.assert_called_once()
    job = next(manager.completed_jobs(), None)
    assert job == jobs[1]
    job = next(manager.completed_jobs(), None)
    assert job is None