mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-15 13:37:56 +08:00
Fixes test for cron
This commit is contained in:
@@ -92,12 +92,12 @@ def test_scheduler(broker, monkeypatch):
|
|||||||
minutes=10)
|
minutes=10)
|
||||||
assert hasattr(minute_schedule, 'pk') is True
|
assert hasattr(minute_schedule, 'pk') is True
|
||||||
# Cron schedule
|
# Cron schedule
|
||||||
minute_schedule = create_schedule('django_q.tests.tasks.word_multiply',
|
cron_schedule = create_schedule('django_q.tests.tasks.word_multiply',
|
||||||
2,
|
2,
|
||||||
word='django',
|
word='django',
|
||||||
schedule_type=Schedule.CRON,
|
schedule_type=Schedule.CRON,
|
||||||
cron="0 22 * * 1-5")
|
cron="0 22 * * 1-5")
|
||||||
assert hasattr(minute_schedule, 'pk') is True
|
assert hasattr(cron_schedule, 'pk') is True
|
||||||
# All other types
|
# All other types
|
||||||
for t in Schedule.TYPE:
|
for t in Schedule.TYPE:
|
||||||
if t == Schedule.CRON:
|
if t == Schedule.CRON:
|
||||||
|
|||||||
Reference in New Issue
Block a user