From d4b72d330d05d2a988de19056e3ec2d5794c1344 Mon Sep 17 00:00:00 2001 From: Travis Johnson Date: Tue, 9 Dec 2014 12:04:57 -0500 Subject: [PATCH] test for skip_queue mechanics --- tests/test_queue.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_queue.py b/tests/test_queue.py index ed42204..8bfde6d 100644 --- a/tests/test_queue.py +++ b/tests/test_queue.py @@ -459,3 +459,13 @@ class TestFailedQueue(RQTestCase): """Ensure custom job class assignment works as expected.""" q = Queue(job_class=CustomJob) self.assertEqual(q.job_class, CustomJob) + + def test_skip_queue(self): + """Ensure the skip_queue option functions""" + q = Queue('foo') + job1 = q.enqueue(say_hello) + job2 = q.enqueue(say_hello) + assert q.dequeue() == job1 + skip_job = q.enqueue(say_hello, skip_queue=True) + assert q.dequeue() == skip_job + assert q.dequeue() == job2