mirror of https://github.com/peter4431/rq.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
550 B
Python
16 lines
550 B
Python
from rq import Queue
|
|
from tests import RQTestCase, fixtures
|
|
|
|
|
|
class TestFixtures(RQTestCase):
|
|
def test_rpush_fixture(self):
|
|
fixtures.rpush('foo', 'bar')
|
|
assert self.testconn.lrange('foo', 0, 0)[0].decode() == 'bar'
|
|
|
|
def test_start_worker_fixture(self):
|
|
queue = Queue(name='testing', connection=self.testconn)
|
|
queue.enqueue(fixtures.say_hello)
|
|
conn_kwargs = self.testconn.connection_pool.connection_kwargs
|
|
fixtures.start_worker(queue.name, conn_kwargs, 'w1', True)
|
|
assert not queue.jobs
|