bito-code-review[bot] commented on code in PR #41424:
URL: https://github.com/apache/superset/pull/41424#discussion_r3590547783
##########
tests/integration_tests/reports/commands_tests.py:
##########
@@ -988,6 +1019,50 @@ def test_email_chart_report_schedule_with_csv(
assert_log(ReportState.SUCCESS)
[email protected](
+ "load_birth_names_dashboard_with_slices",
+ "create_report_email_chart_with_xlsx",
+)
+@patch("superset.utils.csv.urllib.request.urlopen")
+@patch("superset.utils.csv.urllib.request.OpenerDirector.open")
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Wrong mock module path for XLSX</b></div>
<div id="fix">
The XLSX test mocks `superset.utils.csv.urllib.request.urlopen` and
`superset.utils.csv.urllib.request.OpenerDirector.open`, but XLSX data fetching
goes through `_post_chart_data` in `execute.py` (lines 687-697) using
`urllib.request.build_opener().open()` — not the `get_chart_csv_data` path in
`csv.py`. This mismatch means the test isn't verifying the correct code path
for XLSX generation. Note: `test_email_chart_report_schedule_with_csv`
correctly patches `superset.utils.csv.*` because CSV does use
`get_chart_csv_data` from `csv.py`.
</div>
</div>
<small><i>Code Review Run #6e2348</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]