update test_tasks to use task.query