rusackas commented on code in PR #41424:
URL: https://github.com/apache/superset/pull/41424#discussion_r3592710241
##########
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:
False positive on this one.
`patch("superset.utils.csv.urllib.request.OpenerDirector.open")` isn't patching
a csv-local copy, it resolves to the same global
`urllib.request.OpenerDirector` class, so the `build_opener().open()` in
`_post_chart_data` goes through the exact same mock. The xlsx fixture sets a
query_context, so the request takes that path, and the test only passes because
the attachment actually comes back as `XLSX_FILE`. Resolving.
--
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]