mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
test: update invalid arguments test to expect ValueError
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user