mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-08 10:18:12 +08:00
Fixes Travis error
added failing hook to tests
This commit is contained in:
@@ -103,4 +103,6 @@ LOGGING = {
|
|||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
# Django Q specific
|
# Django Q specific
|
||||||
Q_CLUSTER = {'name': 'django_q_test'}
|
Q_CLUSTER = {'name': 'django_q_test',
|
||||||
|
'timeout': 60,
|
||||||
|
'recycle': 100}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from future.types.newstr import unicode
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
@@ -106,8 +106,8 @@ def test_async(r):
|
|||||||
f = async(multiply, 753, 2, hook=assert_result, list_key=list_key)
|
f = async(multiply, 753, 2, hook=assert_result, list_key=list_key)
|
||||||
# model as argument
|
# model as argument
|
||||||
g = async('django_q.tests.tasks.get_task_name', Task(name='John'), list_key=list_key)
|
g = async('django_q.tests.tasks.get_task_name', Task(name='John'), list_key=list_key)
|
||||||
# args and kwargs
|
# args and kwargs and broken hook
|
||||||
h = async('django_q.tests.tasks.word_multiply', 2, word='django', list_key=list_key, redis=r)
|
h = async('django_q.tests.tasks.word_multiply', 2, word='django', hook='fail.me', list_key=list_key, redis=r)
|
||||||
# check if everything has a task name
|
# check if everything has a task name
|
||||||
assert isinstance(a, str)
|
assert isinstance(a, str)
|
||||||
assert isinstance(b, str)
|
assert isinstance(b, str)
|
||||||
|
|||||||
Reference in New Issue
Block a user