def METHOD_NAME(tree, tmp_path, mocker):
    askyesno = mocker.patch("tkinter.messagebox.askyesno")
    askyesno.return_value = True
    (tmp_path / "file.txt").write_text("blah")
    add_project_and_select_file(tmp_path / "file.txt")
    tree.event_generate("<<FileManager:Delete>>")
    askyesno.assert_called_once_with(
        "Delete file.txt", "Do you want to permanently delete file.txt?", icon="warning"
    )
    assert not (tmp_path / "subdir").exists()