Skip to content

Commit 8ad1645

Browse files
committed
fix(tests): update tool delete test to expect association cleanup execute call
delete_tool now calls db.execute twice: once for server_tool_association cleanup and once for the tool DELETE. The test assertion was stale after commit 5be84b4 added the association cleanup step. Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
1 parent f514b10 commit 8ad1645

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/mcpgateway/services/test_resource_ownership.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ async def test_delete_tool_owner_success(self, tool_service, mock_db_session):
285285

286286
await tool_service.delete_tool(mock_db_session, "tool-1", user_email="owner@example.com")
287287

288-
# Verify execute was called for DELETE ... RETURNING
289-
mock_db_session.execute.assert_called_once()
288+
# Verify execute was called for association cleanup + tool DELETE
289+
assert mock_db_session.execute.call_count == 2
290290
mock_db_session.commit.assert_called_once()
291291

292292
@pytest.mark.asyncio

0 commit comments

Comments
 (0)