From b4e1f5dba7bb9c1eecf83eec053d934009c510c8 Mon Sep 17 00:00:00 2001 From: Amin Ghadersohi Date: Mon, 29 Jun 2026 16:38:29 +0000 Subject: [PATCH] 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. --- tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py b/tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py index 2700de70b70..e90eb6641b9 100644 --- a/tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py +++ b/tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py @@ -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,