def test_no_current_artifact_apply_patch(editor: ArtifactEditorToolSpec):
    """Test error when trying to apply patch without current artifact."""
    patch = JsonPatch(
        operations=[PatchOperation(op="replace", path="/name", value="Jane")]
    )

    with pytest.raises(AttributeError):
        editor.apply_patch(patch)
Test error when trying to apply patch without current artifact.
llama-index-integrations/tools/llama-index-tools-artifact-editor/tests/test_artifact_editor.py