mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix(mcp): add description and certification fields to default list tool columns (#39017)
(cherry picked from commit 7be2acb2f3)
This commit is contained in:
committed by
Michael S. Molina
parent
4764eea1dc
commit
b9b48fb1e4
@@ -153,16 +153,18 @@ class TestModelSchemaInfo:
|
||||
|
||||
def test_chart_default_columns(self):
|
||||
"""Test chart default columns include required minimal set."""
|
||||
required_columns = {
|
||||
assert set(CHART_DEFAULT_COLUMNS) == {
|
||||
"id",
|
||||
"slice_name",
|
||||
"viz_type",
|
||||
"description",
|
||||
"certified_by",
|
||||
"certification_details",
|
||||
"url",
|
||||
"changed_on",
|
||||
"changed_on_humanized",
|
||||
}
|
||||
assert required_columns.issubset(set(CHART_DEFAULT_COLUMNS))
|
||||
# These should NOT be in defaults
|
||||
assert "description" not in CHART_DEFAULT_COLUMNS
|
||||
# Heavy columns should NOT be in defaults
|
||||
assert "form_data" not in CHART_DEFAULT_COLUMNS
|
||||
assert "uuid" not in CHART_DEFAULT_COLUMNS
|
||||
|
||||
@@ -291,12 +293,17 @@ class TestGetSchemaToolViaClient:
|
||||
assert id_col["type"] == "int"
|
||||
assert id_col["is_default"] is True
|
||||
|
||||
# Find a non-default column (description is on the model)
|
||||
# description is now a default column
|
||||
desc_col = next(
|
||||
(c for c in select_cols if c["name"] == "description"), None
|
||||
)
|
||||
assert desc_col is not None
|
||||
assert desc_col["is_default"] is False
|
||||
assert desc_col["is_default"] is True
|
||||
|
||||
# Find a non-default column (uuid is on the model but not default)
|
||||
uuid_col = next((c for c in select_cols if c["name"] == "uuid"), None)
|
||||
assert uuid_col is not None
|
||||
assert uuid_col["is_default"] is False
|
||||
|
||||
|
||||
class TestGetSchemaEdgeCases:
|
||||
|
||||
Reference in New Issue
Block a user