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.