def test_no_duplicate_task_type_error_is_raised(router: ZeebeTaskRouter, task: Task): router._is_task_duplicate(task.type)
def test_check_is_task_duplicate_with_duplicate(router: ZeebeTaskRouter, task: Task): router.tasks.append(task) with pytest.raises(DuplicateTaskTypeError): router._is_task_duplicate(task.type)