@@ -25,7 +25,9 @@ async def test_datafabric_handler_returns_single_terminal_tool_message():
2525 handler ._compiled = _FakeCompiledGraph ( # type: ignore[assignment]
2626 {
2727 "messages" : [
28- ToolMessage (content = "{'records': [1], 'total_count': 1}" , tool_call_id = "1" )
28+ ToolMessage (
29+ content = "{'records': [1], 'total_count': 1}" , tool_call_id = "1"
30+ )
2931 ]
3032 }
3133 )
@@ -61,7 +63,10 @@ async def test_datafabric_handler_aggregates_multiple_terminal_tool_messages():
6163 assert "Multiple SQL queries executed successfully." in result
6264 assert "Result 1:" in result
6365 assert "Result 2:" in result
64- assert "{'records': [{'id': 1}], 'total_count': 1, 'sql_query': 'SELECT ...'}" in result
66+ assert (
67+ "{'records': [{'id': 1}], 'total_count': 1, 'sql_query': 'SELECT ...'}"
68+ in result
69+ )
6570 assert (
6671 "{'records': [{'name': 'Acme'}], 'total_count': 1, 'sql_query': 'SELECT ...'}"
6772 in result
@@ -77,7 +82,9 @@ async def test_datafabric_handler_prefers_terminal_ai_message():
7782 handler ._compiled = _FakeCompiledGraph ( # type: ignore[assignment]
7883 {
7984 "messages" : [
80- ToolMessage (content = "{'records': [], 'total_count': 0}" , tool_call_id = "1" ),
85+ ToolMessage (
86+ content = "{'records': [], 'total_count': 0}" , tool_call_id = "1"
87+ ),
8188 AIMessage (content = "I could not find any matching rows." ),
8289 ]
8390 }
0 commit comments