4

Im writing test for schedule task, but the task_id return always None

update_task_id = update_delivery_minutes_change.schedule(
    args=(instance.id,),
    delay=(60 * 30)
)
update_task_id.task.task_id -> None

How can i mock or emulate huey for create a test case?

  • Hi, Can you not use the flag `debug=True` ? https://huey.readthedocs.io/en/latest/django.html#debug-and-synchronous-execution – Ehvince Sep 15 '16 at 23:27

1 Answers1

1

Try with immediate mode:

huey.immediate = True

see: Immediate mode