ephraimbuddy commented on code in PR #53699:
URL: https://github.com/apache/airflow/pull/53699#discussion_r2228813175
##########
airflow-core/tests/unit/cli/commands/test_dag_command.py:
##########
@@ -813,7 +813,7 @@ def test_dag_test_with_custom_timetable(self,
mock__get_or_create_dagrun):
)
from airflow.example_dags.plugins.workday import AfterWorkdayTimetable
- with mock.patch.object(AfterWorkdayTimetable, "get_next_workday",
side_effect=[DEFAULT_DATE]):
+ with mock.patch.object(AfterWorkdayTimetable, "get_next_workday",
return_value=DEFAULT_DATE):
Review Comment:
"get_next_workday" is now called in multiple places while syncing a dag to
the DB. Because of that, using side_effect causes issue as after the first
call, the next call results in stopIteration. I had to change it to
return_value which allows multiple calls
--
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]