mirror of
https://github.com/apache/superset.git
synced 2026-07-12 09:45:43 +00:00
Four unit tests pin the behavior the validator added in 46f138326b: * Valid UUID-format strings get coerced to ``uuid.UUID`` instances — the primary contract that makes importers, test fixtures, and ad-hoc ``Model(uuid=...)`` construction see a consistent type. * Already-``UUID`` values pass through unchanged (the validator must not re-wrap; ``is`` identity check pins this). * Non-UUID-shaped strings pass through unchanged. This keeps test mocks that use placeholder strings (e.g. ``tests/unit_tests/mcp_service/dashboard/test_dashboard_schemas.py::test_dashboard_schema`` with ``"dashboard-uuid-7"``) working. Without this contract, those tests would break under the validator and need to migrate to ``uuid.uuid4()``. If the contract is ever tightened to raise, this test catches the regression and signals the migration cost. * ``None`` passes through unchanged. Closes review item S3 from the sqlalchemy-review pass on sc-103156-versioning. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>