def test_configure_task_known(app): @app.task(name="foobar", queue="marsupilami") def mytask(): pass job = cli.configure_task(app, "foobar", {}, allow_unknown=False).job assert job.task_name == "foobar" assert job.queue == "marsupilami"
def test_test_configure_task_error(app): with pytest.raises(exceptions.TaskNotFound): assert cli.configure_task(app, "foobar", {}, allow_unknown=False)
def test_configure_task_unknown(app): job = cli.configure_task(app, "foobar", {}, allow_unknown=True).job assert job.task_name == "foobar" assert job.queue == "default"