Skip to content

Commit 0bd11c3

Browse files
committed
fix tests
1 parent 00b8cce commit 0bd11c3

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

core/tests/agents/test_main_agent.py

+8-11
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from cat.mad_hatter.mad_hatter import MadHatter
77
from cat.agents.main_agent import MainAgent
8+
from cat.agents.base_agent import AgentOutput
89

910
from tests.agents.agent_fixtures import main_agent, stray
1011

@@ -17,15 +18,11 @@ def test_main_agent_instantiation(main_agent):
1718

1819

1920
@pytest.mark.asyncio # to test async functions
20-
async def test_execute_agent(main_agent, stray):
21+
async def test_execute_main_agent(main_agent, stray):
2122
# empty agent execution
22-
out = await main_agent.execute_agent(stray)
23-
assert out["input"] == "meow"
24-
assert out["episodic_memory"] == ""
25-
assert out["declarative_memory"] == ""
26-
assert out["tools_output"] == ""
27-
assert out["intermediate_steps"] == []
28-
assert (
29-
out["output"]
30-
== "AI: You did not configure a Language Model. Do it in the settings!"
31-
)
23+
out = await main_agent.execute(stray)
24+
assert isinstance(out, AgentOutput)
25+
assert not out.return_direct
26+
assert out.intermediate_steps == []
27+
assert out.output == \
28+
"AI: You did not configure a Language Model. Do it in the settings!"

0 commit comments

Comments
 (0)