bito-code-review[bot] commented on code in PR #38890:
URL: https://github.com/apache/superset/pull/38890#discussion_r3002883228


##########
tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_generation.py:
##########
@@ -915,17 +909,15 @@ async def test_add_chart_to_specific_tab_by_name(
                 "DASHBOARD_VERSION_KEY": "v2",
             }
         )
+        mock_find_dashboard.return_value = mock_dashboard

Review Comment:
   <!-- Bito Reply -->
   The comment highlights a valid issue with the mock setup for consecutive DAO 
calls in the test. The code calls DashboardDAO.find_by_id twice—once for 
validation and once for re-fetch after update—so the mock should return 
different dashboards (initial for validation, updated for re-fetch). Using 
side_effect is correct; return_value alone isn't sufficient. The PR's change to 
return_value may break the test logic.



-- 
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]

Reply via email to