

def test_get_jobs(self):
    '\n        Ensure get_jobs() returns all jobs until the specified time.\n        '
    now = datetime.utcnow()
    job = self.scheduler.enqueue_at(now, say_hello)
    self.assertIn(job, self.scheduler.get_jobs(now))
    future_time = (now + timedelta(hours=1))
    job = self.scheduler.enqueue_at(future_time, say_hello)
    self.assertIn(job, self.scheduler.get_jobs(timedelta(hours=1, seconds=1)))
    self.assertIn(job, [j[0] for j in self.scheduler.get_jobs(with_times=True)])
    self.assertIsInstance(self.scheduler.get_jobs(with_times=True)[0][1], datetime)
    self.assertNotIn(now, self.scheduler.get_jobs(timedelta(minutes=59, seconds=59)))

dataset/ETHPy150Open ui/rq-scheduler/tests/test_scheduler.py TestScheduler.test_get_jobs/VarMisuse@155/209 `job`->`now`