villebro commented on code in PR #22328:
URL: https://github.com/apache/superset/pull/22328#discussion_r1039690006


##########
tests/integration_tests/reports/alert_tests.py:
##########
@@ -16,39 +16,50 @@
 # under the License.
 # pylint: disable=invalid-name, unused-argument, import-outside-toplevel
 from contextlib import nullcontext
-from typing import List, Optional, Union
+from typing import List, Optional, Tuple, Union
 
 import pandas as pd
 import pytest
 from pytest_mock import MockFixture
 
 from superset.reports.commands.exceptions import AlertQueryError
 from superset.reports.models import ReportCreationMethod, ReportScheduleType
-from superset.reports.types import ReportScheduleExecutor
+from superset.tasks.types import ExecutorType
 from superset.utils.database import get_example_database
 from tests.integration_tests.test_app import app
 
 
 @pytest.mark.parametrize(
     "owner_names,creator_name,config,expected_result",
     [
-        (["gamma"], None, [ReportScheduleExecutor.SELENIUM], "admin"),
-        (["gamma"], None, [ReportScheduleExecutor.OWNER], "gamma"),
-        (["alpha", "gamma"], "gamma", [ReportScheduleExecutor.CREATOR_OWNER], 
"gamma"),
-        (["alpha", "gamma"], "alpha", [ReportScheduleExecutor.CREATOR_OWNER], 
"alpha"),
+        (["gamma"], None, [ExecutorType.SELENIUM], (ExecutorType.SELENIUM, 
"admin")),
+        (["gamma"], None, [ExecutorType.OWNER], (ExecutorType.OWNER, "gamma")),
+        (
+            ["alpha", "gamma"],
+            "gamma",
+            [ExecutorType.CREATOR_OWNER],
+            (ExecutorType.CREATOR_OWNER, "gamma"),
+        ),
+        (
+            ["alpha", "gamma"],
+            "alpha",
+            [ExecutorType.CREATOR_OWNER],
+            (ExecutorType.CREATOR_OWNER, "alpha"),
+        ),
         (
             ["alpha", "gamma"],
             "admin",
-            [ReportScheduleExecutor.CREATOR_OWNER],
+            [ExecutorType.CREATOR_OWNER],
             AlertQueryError(),
         ),
+        (["gamma"], None, [ExecutorType.INITIATOR], AlertQueryError()),

Review Comment:
   this is really just one added test for the new `INITIATOR` case, other than 
that it's just updating the test cases to conform to the new sig of 
`get_executor`



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