test: remove delete error from mcp test
This commit is contained in:
parent
3b8a607b5f
commit
c48b274571
1 changed files with 13 additions and 14 deletions
|
|
@ -408,25 +408,24 @@ DEBUG = True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Test with invalid UUIDs to check error handling
|
# Test with invalid UUIDs to check error handling
|
||||||
invalid_result = await session.call_tool(
|
try:
|
||||||
"delete",
|
await session.call_tool(
|
||||||
arguments={
|
"delete",
|
||||||
"data_id": "invalid-uuid",
|
arguments={
|
||||||
"dataset_id": "another-invalid-uuid",
|
"data_id": "invalid-uuid",
|
||||||
"mode": "soft",
|
"dataset_id": "another-invalid-uuid",
|
||||||
},
|
"mode": "soft",
|
||||||
)
|
},
|
||||||
|
)
|
||||||
if invalid_result.content and len(invalid_result.content) > 0:
|
except Exception as e:
|
||||||
invalid_content = invalid_result.content[0].text
|
assert ("Invalid UUID format" in e)
|
||||||
|
|
||||||
assert("Invalid UUID format" in invalid_content)
|
|
||||||
self.test_results["delete_error_handling"] = {
|
self.test_results["delete_error_handling"] = {
|
||||||
"status": "PASS",
|
"status": "PASS",
|
||||||
"result": invalid_content,
|
"result": e,
|
||||||
"message": "delete error handling works correctly",
|
"message": "delete error handling works correctly",
|
||||||
}
|
}
|
||||||
print("✅ delete error handling test passed")
|
print("✅ delete error handling test passed")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise Exception("Delete error test returned no content")
|
raise Exception("Delete error test returned no content")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue