

def test_enqueue_in(self):
    '\n        Ensure that jobs have the right scheduled time.\n        '
    right_now = datetime.utcnow()
    time_delta = timedelta(minutes=1)
    job = self.scheduler.enqueue_in(time_delta, say_hello)
    self.assertIn(job.id, tl(self.testconn.zrange(self.scheduler.scheduled_jobs_key, 0, 1)))
    self.assertEqual(self.testconn.zscore(self.scheduler.scheduled_jobs_key, job.id), to_unix((right_now + time_delta)))
    time_delta = timedelta(hours=1)
    job = self.scheduler.enqueue_in(time_delta, say_hello)
    self.assertEqual(self.testconn.zscore(self.scheduler.scheduled_jobs_key, job.id), to_unix((right_now + time_delta)))

dataset/ETHPy150Open ui/rq-scheduler/tests/test_scheduler.py TestScheduler.test_enqueue_in/original