def test_remove_task_from_many(router: ZeebeTaskRouter, task: Task): router.tasks.append(task) for _ in range(1, randint(0, 100)): @router.task(str(uuid4())) def dummy_function(): pass router.remove_task(task.type) assert task not in router.tasks
def test_remove_fake_task(router: ZeebeTaskRouter): with pytest.raises(TaskNotFoundError): router.remove_task(str(uuid4()))
def test_remove_task(router: ZeebeTaskRouter, task: Task): router.tasks.append(task) router.remove_task(task.type) assert task not in router.tasks