mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-19 02:48:16 +08:00
fixes iron-mq test
purging a queue that never had a message in it raises a not found error. So we queue one message to initialize.
This commit is contained in:
@@ -96,13 +96,14 @@ def test_disque():
|
||||
@pytest.mark.skipif(not os.getenv('IRON_MQ_TOKEN'),
|
||||
reason="requires IronMQ credentials")
|
||||
def test_ironmq():
|
||||
Conf.IRON_MQ = {'host': os.getenv('IRON_MQ_HOST'),
|
||||
'token': os.getenv('IRON_MQ_TOKEN'),
|
||||
Conf.IRON_MQ = {'token': os.getenv('IRON_MQ_TOKEN'),
|
||||
'project_id': os.getenv('IRON_MQ_PROJECT_ID')}
|
||||
# check broker
|
||||
broker = get_broker(list_key='djangoQ')
|
||||
assert broker.ping() is True
|
||||
assert broker.info() is not None
|
||||
# initialize the queue
|
||||
broker.enqueue('test')
|
||||
# clear before we start
|
||||
broker.purge_queue()
|
||||
# enqueue
|
||||
|
||||
Reference in New Issue
Block a user