kacpermuda commented on code in PR #70760:
URL: https://github.com/apache/airflow/pull/70760#discussion_r3703913057
##########
airflow-core/tests/unit/jobs/test_scheduler_job.py:
##########
@@ -9635,6 +9635,205 @@ def test_dag_timeout_notifies_with_timed_out_msg(self,
mock_get_listener_manager
assert call_args.kwargs["msg"] == "timed_out"
assert call_args.kwargs["dag_run"] == dag_run
+ @conf_vars({("core", "multi_team"): "true"})
+ @mock.patch("airflow.models.dagrun.get_listener_manager")
+ def test_dag_start_notifies_listener_with_team_name(self,
mock_get_listener_manager, dag_maker, session):
+ """Test that on_dag_run_running receives dag_run with _team_name
set."""
+ mock_listener_manager = MagicMock()
+ mock_get_listener_manager.return_value = mock_listener_manager
+
+ clear_db_teams()
+ clear_db_dag_bundles()
Review Comment:
Correct, I should have just used the fixtures currently present. Adjusted
the code.
--
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]