async def test_ignore_startup_delay(time: FakeTime, model: Model, dest: HelperTestSource, source: HelperTestSource, global_info: GlobalInfo): time.setNow(time.local(2019, 5, 10)) global_info.triggerSnapshotCooldown(timedelta(minutes=10)) model.ignore_startup_delay = True assert model.nextSnapshot(time.now()) == time.now() - timedelta(minutes=1) assert not model.waiting_for_startup
async def test_wait_for_startup_no_snapshot(time: FakeTime, model: Model, dest: HelperTestSource, source: HelperTestSource, global_info: GlobalInfo): time.setNow(time.local(2019, 5, 10)) global_info.triggerSnapshotCooldown(timedelta(minutes=10)) assert model.nextSnapshot(time.now()) == time.now() + timedelta(minutes=10) assert model.nextSnapshot(time.now()) == global_info.snapshotCooldownTime() assert model.waiting_for_startup time.advance(minutes=10) assert model.nextSnapshot(time.now()) == time.now() - timedelta(minutes=1) assert not model.waiting_for_startup