test: update invalid arguments test to expect ValueError

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-24 13:28:02 +00:00
parent 2cf0b0c342
commit 33a8e0254b

View File

@@ -288,7 +288,7 @@ class TestWebSocketToolUsage:
arguments={},
log="Test log",
)
with pytest.raises(ValueError):
with pytest.raises(ValueError, match="Tool arguments cannot be empty"):
tool_usage.use(calling, "Test string")
# Test with None arguments
@@ -297,8 +297,8 @@ class TestWebSocketToolUsage:
arguments=None,
log="Test log",
)
result = tool_usage.use(calling, "Test string")
assert "error" in result.lower()
with pytest.raises(ValueError, match="Tool arguments cannot be empty"):
tool_usage.use(calling, "Test string")
def test_validate_tool_input_booleans_and_none():