Files
superset2/tests/unit_tests
Amin Ghadersohi 43fb9043ea fix(mcp): fix CI failures — sql_expression handling, cardinality guard, test mock fixes
- big_number.py pre_validate: add sql_expression branch; return
  MISSING_SQL_METRIC_LABEL when label is absent/non-string, so the
  existing unit tests (and LLM callers) get a clear actionable error.
- xy.py normalize_column_refs: skip entries with sql_expression set
  (name is None for these metrics); previously crashed with
  AttributeError: 'NoneType'.lower() in _get_canonical_column_name.
- test_big_number_chart.py: replace three calls to deleted
  SchemaValidator._pre_validate_big_number_config with
  plugin.pre_validate() via get_registry().
- test_runtime_validator.py: replace call to deleted
  RuntimeValidator._validate_cardinality with XYChartPlugin.get_runtime_warnings;
  patch FormatTypeValidator to isolate cardinality guard.
- test_update_chart.py: set mock_create_preview.return_value to a
  3-tuple so the update_chart unpack doesn't crash; change RuntimeError
  to ValueError which is in NORMALIZATION_EXCEPTIONS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 19:30:34 +00:00
..
2025-09-12 09:21:37 +01:00