Esempio n. 1
0
def test_schedule_daily_with_time():
    timeline = Timeline()
    timeline.schedule_checks([DummyCheck([
        TimelineRule(1, 'day', '12:34')
    ])])
    next_run = timeline.scheduler.jobs[0].next_run
    assert next_run.hour == 12
    assert next_run.minute == 34
Esempio n. 2
0
def test_schedule_daily_uses_current_time_by_default():
    timeline = Timeline()
    timeline.schedule_checks([DummyCheck([
        TimelineRule(1, 'day', None)
    ])])
    next_run = timeline.scheduler.jobs[0].next_run
    assert next_run.hour == 12
    assert next_run.minute == 34