test(trash): update delete-tool tests to soft-delete contract (patch trash_svc.delete)

This commit is contained in:
2026-05-29 09:24:58 -04:00
parent bfeed67cfe
commit a40334312f
3 changed files with 16 additions and 19 deletions
+6 -6
View File
@@ -165,20 +165,20 @@ async def test_update_note_raises_when_not_found():
@pytest.mark.asyncio
async def test_delete_note_returns_confirmation_string():
async def test_delete_note_soft_deletes_and_returns_batch():
with patch(
"fabledassistant.mcp.tools.notes.notes_svc.delete_note",
AsyncMock(return_value=True),
"fabledassistant.mcp.tools.notes.trash_svc.delete",
AsyncMock(return_value="batch-1"),
):
result = await delete_note(note_id=7)
assert result == "Note 7 deleted."
assert result["deleted_batch_id"] == "batch-1"
@pytest.mark.asyncio
async def test_delete_note_raises_when_not_found():
with patch(
"fabledassistant.mcp.tools.notes.notes_svc.delete_note",
AsyncMock(return_value=False),
"fabledassistant.mcp.tools.notes.trash_svc.delete",
AsyncMock(return_value=None),
):
with pytest.raises(ValueError, match="note 999 not found"):
await delete_note(note_id=999)