mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(mcp): fix crashes in list tools, dataset info, chart preview, and add owner/favorite filters (#38277)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -366,6 +366,6 @@ def test_chart_filter_existing_columns_still_work():
|
||||
|
||||
def test_dashboard_filter_existing_columns_still_work():
|
||||
"""Test that pre-existing dashboard filter columns are not broken."""
|
||||
for col in ("dashboard_title", "published", "favorite"):
|
||||
for col in ("dashboard_title", "published", "created_by_fk"):
|
||||
f = DashboardFilter(col=col, opr="eq", value="test")
|
||||
assert f.col == col
|
||||
|
||||
@@ -95,10 +95,11 @@ def test_model_list_tool_basic():
|
||||
assert result.count == 2
|
||||
assert result.total_count == 2
|
||||
assert isinstance(result.items[0], DummyOutputSchema)
|
||||
assert result.page == 1
|
||||
# run_tool receives 0-based page; response reports 1-based (page+1)
|
||||
assert result.page == 2
|
||||
assert result.page_size == 2
|
||||
assert result.total_pages == 1
|
||||
# For page=1, ModelListCore sets has_previous=True
|
||||
# For page=1 (0-based), ModelListCore sets has_previous=True
|
||||
assert result.has_previous is True
|
||||
assert result.has_next is False
|
||||
assert result.columns_requested == ["id", "name"]
|
||||
|
||||
Reference in New Issue
Block a user