mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-08 10:18:12 +08:00
test model unicode
This commit is contained in:
@@ -142,6 +142,8 @@ def test_enqueue(broker, admin_user):
|
||||
# q_options and save opt_out test
|
||||
k = async_task('django_q.tests.tasks.get_user_id', admin_user,
|
||||
q_options={'broker': broker, 'group': 'test_k', 'save': False, 'timeout': 90})
|
||||
# test unicode
|
||||
assert Task(name='Amalia').__unicode__()=='Amalia'
|
||||
# check if everything has a task id
|
||||
assert isinstance(a, str)
|
||||
assert isinstance(b, str)
|
||||
|
||||
@@ -99,6 +99,7 @@ def test_scheduler(broker, monkeypatch):
|
||||
cron="0 22 * * 1-5")
|
||||
assert hasattr(cron_schedule, 'pk') is True
|
||||
assert cron_schedule.full_clean() is None
|
||||
assert cron_schedule.__unicode__() == 'django_q.tests.tasks.word_multiply'
|
||||
# All other types
|
||||
for t in Schedule.TYPE:
|
||||
if t[0] == Schedule.CRON:
|
||||
|
||||
Reference in New Issue
Block a user