FrankYang0529 commented on code in PR #74483:
URL: https://github.com/apache/airflow/pull/74483#discussion_r4230586253
##########
airflow-core/tests/unit/jobs/test_scheduler_job.py:
##########
@@ -6145,15 +6151,11 @@ def test_should_update_dag_next_dagruns_after_run_type(
ti.state = "failed"
session.flush()
- check_mock = MagicMock()
- self.job_runner._set_exceeds_max_active_runs = check_mock
- with patch("airflow.models.dag.DagModel.calculate_dagrun_date_fields")
as mock_calc:
- self.job_runner._schedule_dag_run(
- dag_run=run,
- session=session,
- )
- assert not mock_calc.called
- assert check_mock.called == expected
+ self.job_runner._schedule_dag_run(
+ dag_run=run,
+ session=session,
+ )
+ assert mock_set_exceeds_max_active_runs.called == expected
Review Comment:
Updated it. Thanks for the suggestion.
--
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]