Skip to content

Commit 4b129bf

Browse files
committed
fix test
1 parent 257a606 commit 4b129bf

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/_ai/tools/tools/test_datasource_tool.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
GetDatabaseTablesArgs,
1313
TableDetails,
1414
)
15+
from marimo._ai._tools.utils.exceptions import ToolExecutionError
1516
from marimo._data.models import Database, DataTable, DataTableColumn, Schema
1617
from marimo._messaging.ops import DataSourceConnections
1718

@@ -280,11 +281,9 @@ def mock_get_session(_session_id):
280281
query=None,
281282
)
282283

283-
result = tool.handle(args)
284-
285-
assert isinstance(result, tool.Output)
286-
assert len(result.tables) == 0
287-
assert "No databases found" in result.next_steps[0]
284+
with pytest.raises(ToolExecutionError) as e:
285+
tool.handle(args)
286+
assert e.value.code == "NO_DATABASES_FOUND"
288287

289288

290289
def test_get_tables_no_matches(

0 commit comments

Comments
 (0)