diff --git a/tests/functional/agent/agent_functional_test.py b/tests/functional/agent/agent_functional_test.py index db1f88db..574ea7f4 100644 --- a/tests/functional/agent/agent_functional_test.py +++ b/tests/functional/agent/agent_functional_test.py @@ -98,7 +98,7 @@ def test_end2end(run_input_map, delete_agents_and_team_agents, AgentFactory): assert response["completed"] is True assert response["status"].lower() == "success" assert "data" in response - assert response["data"]["session_id"] is not None + assert response["data"]["session_id"] is None assert response["data"]["output"] is not None agent.delete() @@ -520,7 +520,7 @@ def test_instructions(delete_agents_and_team_agents, AgentFactory): assert response["completed"] is True assert response["status"].lower() == "success" assert "data" in response - assert response["data"]["session_id"] is not None + assert response["data"]["session_id"] is None assert response["data"]["output"] is not None assert "aixplain" in response["data"]["output"].lower() agent.delete() @@ -734,11 +734,15 @@ def test_agent_with_action_tool(): connector = ModelFactory.get("686432941223092cb4294d3f") # connect - response = connector.connect(authentication_schema=AuthenticationSchema.BEARER_TOKEN, data={"token": os.getenv("SLACK_TOKEN")}) + response = connector.connect( + authentication_schema=AuthenticationSchema.BEARER_TOKEN, data={"token": os.getenv("SLACK_TOKEN")} + ) connection_id = response.data["id"] connection = ModelFactory.get(connection_id) - connection.action_scope = [action for action in connection.actions if action.code == "SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL"] + connection.action_scope = [ + action for action in connection.actions if action.code == "SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL" + ] agent = AgentFactory.create( name="Test Agent", @@ -757,15 +761,22 @@ def test_agent_with_action_tool(): assert response is not None assert response["status"].lower() == "success" assert "helsinki" in response.data.output.lower() - assert "SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL" in [step["tool"] for step in response.data.intermediate_steps[0]["tool_steps"]] + assert "SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL" in [ + step["tool"] for step in response.data.intermediate_steps[0]["tool_steps"] + ] connection.delete() def test_agent_with_mcp_tool(): - connector = ModelFactory.get("68549a33ba00e44f357896f1") + from aixplain.modules.model.integration import AuthenticationSchema + + connector = ModelFactory.get("686eb9cd26480723d0634d3e") # connect response = connector.connect( - data="https://mcp.zapier.com/api/mcp/s/OTJiMjVlYjEtMGE4YS00OTVjLWIwMGYtZDJjOGVkNTc4NjFkOjI0MTNjNzg5LWZlNGMtNDZmNC05MDhmLWM0MGRlNDU4ZmU1NA==/mcp" + authentication_schema=AuthenticationSchema.API_KEY, + data={ + "url": "https://mcp.zapier.com/api/mcp/s/OTJiMjVlYjEtMGE4YS00OTVjLWIwMGYtZDJjOGVkNTc4NjFkOjI0MTNjNzg5LWZlNGMtNDZmNC05MDhmLWM0MGRlNDU4ZmU1NA==/mcp" + }, ) connection_id = response.data["id"] connection = ModelFactory.get(connection_id) diff --git a/tests/functional/team_agent/team_agent_functional_test.py b/tests/functional/team_agent/team_agent_functional_test.py index 5659bfa8..5b9b4972 100644 --- a/tests/functional/team_agent/team_agent_functional_test.py +++ b/tests/functional/team_agent/team_agent_functional_test.py @@ -82,7 +82,7 @@ def test_end2end(run_input_map, delete_agents_and_team_agents, TeamAgentFactory) assert response["completed"] is True assert response["status"].lower() == "success" assert "data" in response - assert response["data"]["session_id"] is not None + assert response["data"]["session_id"] is None assert response["data"]["output"] is not None team_agent.delete() @@ -447,11 +447,15 @@ def test_team_agent_with_slack_connector(): connector = ModelFactory.get("686432941223092cb4294d3f") # connect - response = connector.connect(authentication_schema=AuthenticationSchema.BEARER_TOKEN, data={"token": os.getenv("SLACK_TOKEN")}) + response = connector.connect( + authentication_schema=AuthenticationSchema.BEARER_TOKEN, data={"token": os.getenv("SLACK_TOKEN")} + ) connection_id = response.data["id"] connection = ModelFactory.get(connection_id) - connection.action_scope = [action for action in connection.actions if action.code == "SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL"] + connection.action_scope = [ + action for action in connection.actions if action.code == "SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL" + ] agent = AgentFactory.create( name="Test Agent",