|
5 | 5 |
|
6 | 6 | import pytest |
7 | 7 | from langchain_core.messages import ToolCall |
| 8 | +from pydantic import BaseModel |
8 | 9 | from uipath.agent.models.agent import ( |
9 | 10 | AgentEscalationChannel, |
10 | 11 | AgentEscalationChannelProperties, |
|
18 | 19 | ) |
19 | 20 |
|
20 | 21 | from uipath_langchain.agent.exceptions import AgentRuntimeError |
21 | | -from uipath_langchain.agent.react.types import ( |
22 | | - AgentGraphState, |
23 | | - InnerAgentGraphState, |
24 | | -) |
25 | | -from uipath_langchain.agent.tools.ixp_escalation_tool import ( |
26 | | - create_ixp_escalation_tool, |
27 | | -) |
| 22 | +from uipath_langchain.agent.react.types import AgentGraphState, InnerAgentGraphState |
| 23 | +from uipath_langchain.agent.tools.ixp_escalation_tool import create_ixp_escalation_tool |
28 | 24 |
|
29 | 25 |
|
30 | 26 | def _passthrough_task(fn): |
@@ -119,10 +115,13 @@ def test_tool_has_wrapper_configured(self, escalation_resource): |
119 | 115 | assert hasattr(tool, "awrapper") |
120 | 116 | assert tool.awrapper is not None |
121 | 117 |
|
122 | | - def test_tool_uses_empty_input_schema(self, escalation_resource): |
123 | | - """Test that tool uses empty dict as input schema.""" |
| 118 | + def test_tool_args_schema_is_pydantic_model(self, escalation_resource): |
| 119 | + """Test that args_schema is an empty Pydantic BaseModel.""" |
124 | 120 | tool = create_ixp_escalation_tool(escalation_resource) |
125 | | - assert tool.args_schema == {} |
| 121 | + assert tool.args_schema is not None |
| 122 | + assert isinstance(tool.args_schema, type) |
| 123 | + assert issubclass(tool.args_schema, BaseModel) |
| 124 | + assert tool.args_schema.model_fields == {} |
126 | 125 |
|
127 | 126 | def test_tool_has_vs_escalation_metadata(self, escalation_resource): |
128 | 127 | """Test that tool has vs_escalation metadata with ixp_tool_id and storage_bucket_name.""" |
|
0 commit comments