

def test_enqueue_periodic(self):
    '\n        Ensure .enqueue_periodic() throws a DeprecationWarning\n        '
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter('always')
        job = self.scheduler.enqueue_periodic(datetime.utcnow(), 1, None, say_hello)
        self.assertEqual(1, len(w))
        self.assertEqual(w[0].category, DeprecationWarning)

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