예제 #1
0
def test_schedules(db: FileRunDB):
    count = 7
    for i in range(count):
        data = {'i': i}
        db.store_schedule(data)

    scheds = list(db.list_schedules())
    assert count == len(scheds), 'wrong number of schedules'
    assert set(range(count)) == set(s['i'] for s in scheds), 'bad scheds'
예제 #2
0
def test_schedules(db: FileRunDB):
    count = 7
    for i in range(count):
        data = {"i": i}
        db.store_schedule(data)

    scheds = list(db.list_schedules())
    assert count == len(scheds), "wrong number of schedules"
    assert set(range(count)) == set(s["i"] for s in scheds), "bad scheds"