Skip to content

Commit adb0c49

Browse files
committed
test: extend test assertions to cover input/output schema
1 parent 1e9cd04 commit adb0c49

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

test/unit/tools/test_haystack_service.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ async def test_get_component_definition_success() -> None:
9494
}
9595
}
9696

97-
resource = FakeHaystackServiceResource(get_component_schemas_response=response)
97+
class FakeHaystackServiceResourceWithIO(FakeHaystackServiceResource):
98+
async def get_component_input_output(self, component_name: str) -> dict[str, Any]:
99+
return io_response
100+
101+
resource = FakeHaystackServiceResourceWithIO(get_component_schemas_response=response)
98102
client = FakeClient(resource)
99103
result = await get_component_definition(client, component_type)
100104

@@ -106,6 +110,15 @@ async def test_get_component_definition_success() -> None:
106110
assert "sheet_name" in result
107111
assert "table_format" in result
108112
assert "default: csv" in result
113+
114+
# Check input/output schema information
115+
assert "Input Schema:" in result
116+
assert "file_path" in result
117+
assert "Path to the XLSX file" in result
118+
assert "(required)" in result
119+
assert "Output Schema:" in result
120+
assert "List of documents" in result
121+
assert "array" in result
109122

110123

111124
@pytest.mark.asyncio

0 commit comments

Comments
 (0)