mirror of
https://github.com/apache/superset.git
synced 2026-07-16 19:55:39 +00:00
fix(mcp): fix test_get_chart_info module import shadowed by __init__.py function export
`import superset.mcp_service.chart.tool.get_chart_info as module` resolves to the get_chart_info *function* rather than the module because chart/tool/__init__.py imports the function under the same name, overwriting the submodule attribute on the parent package. Replace with get_chart_info_module (already imported via importlib at module level), which correctly resolves to the module object.
This commit is contained in:
@@ -584,7 +584,7 @@ class TestGetChartInfoPrivacy:
|
||||
|
||||
def test_apply_unsaved_state_override_updates_display_name_for_new_viz_type() -> None:
|
||||
"""Stale display name is recomputed when viz_type is overridden from form_data."""
|
||||
import superset.mcp_service.chart.tool.get_chart_info as module
|
||||
module = get_chart_info_module
|
||||
|
||||
result = ChartInfo(
|
||||
id=1,
|
||||
|
||||
Reference in New Issue
Block a user