From 2a32bd9e9bd4709daff52da904751b827ac5dd22 Mon Sep 17 00:00:00 2001 From: Mery-Sanz Date: Thu, 10 Apr 2025 09:42:16 +0200 Subject: [PATCH] improve test --- tests/agents/test_agent_one_tool.py | 13 +++++++++++++ ... => test_agent_prompt_system_master_template.py} | 0 2 files changed, 13 insertions(+) rename tests/agents/{test_agent_system_master_template.py => test_agent_prompt_system_master_template.py} (100%) diff --git a/tests/agents/test_agent_one_tool.py b/tests/agents/test_agent_one_tool.py index 9290cef8..fac7fda9 100644 --- a/tests/agents/test_agent_one_tool.py +++ b/tests/agents/test_agent_one_tool.py @@ -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()) + diff --git a/tests/agents/test_agent_system_master_template.py b/tests/agents/test_agent_prompt_system_master_template.py similarity index 100% rename from tests/agents/test_agent_system_master_template.py rename to tests/agents/test_agent_prompt_system_master_template.py