hughhhh commented on a change in pull request #18795:
URL: https://github.com/apache/superset/pull/18795#discussion_r816376552
##########
File path: tests/integration_tests/reports/commands_tests.py
##########
@@ -1014,46 +1014,46 @@ def test_email_dashboard_report_schedule(
assert_log(ReportState.SUCCESS)
[email protected](
- "load_birth_names_dashboard_with_slices",
- "create_report_email_dashboard_force_screenshot",
-)
-@patch("superset.reports.notifications.email.send_email_smtp")
-@patch("superset.utils.screenshots.DashboardScreenshot.get_screenshot")
-def test_email_dashboard_report_schedule_force_screenshot(
- screenshot_mock, email_mock, create_report_email_dashboard_force_screenshot
-):
- """
- ExecuteReport Command: Test dashboard email report schedule
- """
- # setup screenshot mock
- screenshot_mock.return_value = SCREENSHOT_FILE
-
- with freeze_time("2020-01-01T00:00:00Z"):
- AsyncExecuteReportScheduleCommand(
- TEST_ID,
- create_report_email_dashboard_force_screenshot.id,
- datetime.utcnow(),
- ).run()
-
- notification_targets = get_target_from_report_schedule(
- create_report_email_dashboard_force_screenshot
- )
- # assert that the link sent is correct
- assert (
- '<a href="http://0.0.0.0:8080/superset/dashboard/'
- f"{create_report_email_dashboard_force_screenshot.id}"
- '/?standalone=0&force=true">Explore in Superset</a>'
- in email_mock.call_args[0][2]
- )
-
- # Assert the email smtp address
- assert email_mock.call_args[0][0] == notification_targets[0]
- # Assert the email inline screenshot
- smtp_images = email_mock.call_args[1]["images"]
- assert smtp_images[list(smtp_images.keys())[0]] == SCREENSHOT_FILE
- # Assert logs are correct
- assert_log(ReportState.SUCCESS)
+# @pytest.mark.usefixtures(
Review comment:
i just commented it out for testing purposes (building in shell) lol,
adding it back now
--
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]