improve test

This commit is contained in:
Mery-Sanz 2025-04-10 09:42:16 +02:00
parent 75869265a5
commit 2a32bd9e9b
2 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,18 @@ from tests.test_responses import (
)
from cai.sdk.agents import Runner
from cai.agents.one_tool import transfer_to_one_tool_agent
from cai.agents.one_tool import one_tool_agent
@pytest.mark.asyncio
async def test_ctf_agent_instructions_and_configuration():
agent = transfer_to_one_tool_agent()
# Check that the agent has the generic_linux_command tool
assert any(tool.name== "generic_linux_command" for tool in agent.tools)
# Optionally, you can check the agent's instructions and configuration
assert agent.instructions is not None
assert agent.name == "CTF agent"
@pytest.mark.asyncio
async def test_ctf_agent_executes_linux_command():
@ -31,3 +43,4 @@ async def test_ctf_agent_executes_linux_command():
assert len(result.raw_responses) == 2
assert any("generic_linux_command" in str(item) for item in result.to_input_list())