aminghadersohi commented on code in PR #44148:
URL: https://github.com/apache/superset/pull/44148#discussion_r4141014206
##########
tests/unit_tests/mcp_service/chart/test_compile.py:
##########
@@ -766,3 +766,29 @@ def test_aggregation_ambiguity_returns_validation_errors()
-> None:
)
assert len(errors) == 1
assert errors[0].error_code == "AMBIGUOUS_DATASET_REFERENCE"
+
+
+@patch("superset.commands.chart.data.get_data_command.ChartDataCommand")
+@patch("superset.common.query_context_factory.QueryContextFactory")
+def test_compile_chart_returns_structured_error_for_malformed_gantt_form_data(
+ mock_factory, mock_cmd_cls
+):
Review Comment:
Fixed in 3f0ff3efdc3753dc6697da898c3105130f206dae. Added mock_factory: Mock,
mock_cmd_cls: Mock, and -> None to the malformed-Gantt compile regression test,
reusing the existing Mock import. No test behavior changed. Validation:
PYTHONPATH="$PWD/superset-core/src:$PWD" pytest
tests/unit_tests/mcp_service/chart -q: 3,001 passed, 3 skipped. Pre-commit on
the staged test file passed, including mypy and Ruff.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]