Files
superset2/tests/unit_tests
Amin Ghadersohi 7bb3a48d26 fix(mcp): add AliasChoices to chart/dashboard/dataset request schemas (#41597)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

(cherry picked from commit bd9ba24266)

[6.0 adaptation] Production schema aliases (chart/dashboard/dataset schemas.py)
applied to the 6.0 baseline. Two files needed adaptation because 6.0 predates
later MCP refactors:

- chart/schemas.py: kept the 6.0 base classes and added only
  `model_config = ConfigDict(populate_by_name=True)` to GenerateExploreLinkRequest
  and UpdateChartPreviewRequest. Dropped upstream's ChartRequestNormalizerMixin
  base (absent on 6.0 — would be F821); the model_config achieves the same
  populate-by-name behavior the aliases require.

- test_dashboard_schemas.py: kept TestRequestSchemaAliasChoices (exercises
  GetDashboardInfoRequest / ListDashboardsRequest / AddChartToDashboardRequest —
  all present on 6.0). Dropped upstream's TestDuplicateDashboardResponse (the
  Duplicate Dashboard feature is absent on 6.0).

dashboard/dataset schemas.py, chart/dataset tests, and the new dataset test
file applied clean. pytest: 184 passed (42 alias/canonical-resolution cases)
across all three schema test files.
2026-07-17 11:29:42 -07:00
..
2024-05-29 19:04:37 -07:00
2024-05-29 19:04:37 -07:00
2025-09-12 17:07:53 -07:00