

def test_one_job_fails_to_load(persistent_jobstore, create_add_job, monkeypatch, timezone):
    job1 = create_add_job(persistent_jobstore, dummy_job, datetime(2016, 5, 3))
    job2 = create_add_job(persistent_jobstore, dummy_job2, datetime(2014, 2, 26))
    create_add_job(persistent_jobstore, dummy_job3, datetime(2013, 8, 14))
    monkeypatch.delitem(globals(), 'dummy_job3')
    jobs = persistent_jobstore.get_all_jobs()
    assert (jobs == [job2, job1])
    assert (persistent_jobstore.get_next_run_time() == timezone.localize(datetime(2014, 2, 26)))

dataset/ETHPy150Open agronholm/apscheduler/tests/test_jobstores.py test_one_job_fails_to_load/original