

def test_change_execution_time(self):
    "\n        Ensure ``change_execution_time`` is called, ensure that job's score is updated\n        "
    job = self.scheduler.enqueue_at(datetime.utcnow(), say_hello)
    new_date = datetime(2010, 1, 1)
    self.scheduler.change_execution_time(job, new_date)
    self.assertEqual(to_unix(new_date), self.testconn.zscore(self.scheduler.scheduled_jobs_key, job.id))
    self.scheduler.cancel(job)
    self.assertRaises(ValueError, self.scheduler.change_execution_time, job, new_date)

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