How can I try a scheduled task using Huey?

1

I need to create a unit test for a scheduled task (schedule), the task works perfectly but in the tests it always returns None:

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

This is because the task is not scheduled because it runs immediately, how can I avoid this? I need the id of the task to save it in cache.

    
asked by Felipe Zuluaga 29.08.2016 в 23:19
source

0 answers