mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-29 18:18:13 +00:00
test: add comprehensive test suite for allowed_agents functionality
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -155,7 +155,7 @@ def test_allowed_agents_validation():
|
|||||||
)
|
)
|
||||||
assert agent.allowed_agents is None
|
assert agent.allowed_agents is None
|
||||||
|
|
||||||
with pytest.raises(ValueError, match="allowed_agents must be a list"):
|
with pytest.raises(ValueError, match="Input should be a valid list"):
|
||||||
Agent(
|
Agent(
|
||||||
role="Test",
|
role="Test",
|
||||||
goal="Test",
|
goal="Test",
|
||||||
@@ -163,7 +163,7 @@ def test_allowed_agents_validation():
|
|||||||
allowed_agents="invalid"
|
allowed_agents="invalid"
|
||||||
)
|
)
|
||||||
|
|
||||||
with pytest.raises(ValueError, match="must be either a string"):
|
with pytest.raises(ValueError, match="Each item in allowed_agents must be either a string"):
|
||||||
Agent(
|
Agent(
|
||||||
role="Test",
|
role="Test",
|
||||||
goal="Test",
|
goal="Test",
|
||||||
|
|||||||
Reference in New Issue
Block a user