def METHOD_NAME(project_with_injection):
    """Test deleting a plan."""
    grand_parent, parent, plan, child, grand_child, unrelated = create_dummy_plans()
    # Remove by name
    remove_plan(name_or_id=plan.name, force=True)
    # NOTE: We don't delete the plan itself
    assert not grand_parent.deleted
    assert not parent.deleted
    assert not plan.deleted
    assert not child.deleted
    assert not grand_child.deleted
    assert not unrelated.deleted
    last_derivative = get_latest_plan(plan)
    assert grand_child.id == last_derivative.derived_from
    assert last_derivative.deleted
    assert is_plan_removed(grand_parent)
    assert is_plan_removed(parent)
    assert is_plan_removed(plan)
    assert is_plan_removed(child)
    assert is_plan_removed(grand_child)
    assert not is_plan_removed(unrelated)