mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 23:32:39 +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={},
|
arguments={},
|
||||||
log="Test log",
|
log="Test log",
|
||||||
)
|
)
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError, match="Tool arguments cannot be empty"):
|
||||||
tool_usage.use(calling, "Test string")
|
tool_usage.use(calling, "Test string")
|
||||||
|
|
||||||
# Test with None arguments
|
# Test with None arguments
|
||||||
@@ -297,8 +297,8 @@ class TestWebSocketToolUsage:
|
|||||||
arguments=None,
|
arguments=None,
|
||||||
log="Test log",
|
log="Test log",
|
||||||
)
|
)
|
||||||
result = tool_usage.use(calling, "Test string")
|
with pytest.raises(ValueError, match="Tool arguments cannot be empty"):
|
||||||
assert "error" in result.lower()
|
tool_usage.use(calling, "Test string")
|
||||||
|
|
||||||
|
|
||||||
def test_validate_tool_input_booleans_and_none():
|
def test_validate_tool_input_booleans_and_none():
|
||||||
|
|||||||
Reference in New Issue
Block a user