def test_inactive_schedule(self): self.assertEqual( None, get_next_run({ 'is_active': False, 'day_of_week': self.weekdays, 'create_at': '09:15:00' }))
def get_delta(self, create_at, weekdays, time_zone=None, now=None, cron_list=None): schedule = {"day_of_week": weekdays, "create_at": create_at, "is_active": True, "time_zone": time_zone or "UTC"} if cron_list: schedule["cron_list"] = cron_list schedule.pop("create_at", None) next_run = get_next_run(schedule, now or self.now) return next_run - (now or self.now).replace(second=0)
def get_delta(self, create_at, weekdays, time_zone=None, now=None, cron_list=None): schedule = { 'day_of_week': weekdays, 'create_at': create_at, 'is_active': True, 'time_zone': time_zone or 'UTC' } if cron_list: schedule['cron_list'] = cron_list schedule.pop('create_at', None) next_run = get_next_run(schedule, now or self.now) return next_run - (now or self.now).replace(second=0)
def get_delta(self, create_at, weekdays, time_zone=None, now=None, cron_list=None): schedule = { 'day_of_week': weekdays, 'create_at': create_at, 'is_active': True, 'time_zone': time_zone or 'UTC' } if cron_list: schedule['cron_list'] = cron_list schedule.pop('create_at', None) next_run = get_next_run(schedule, now or self.now) return next_run - (now or self.now).replace(second=0)
def test_inactive_schedule(self): self.assertEqual( None, get_next_run({"is_active": False, "day_of_week": self.weekdays, "create_at": "09:15:00"}) )
def test_inactive_schedule(self): self.assertEqual(None, get_next_run({'is_active': False, 'day_of_week': self.weekdays, 'create_at': '09:15:00'}))