test(trash): update delete-tool tests to soft-delete contract (patch trash_svc.delete)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user