LiamHecht commented on code in PR #75562:
URL: https://github.com/apache/airflow/pull/75562#discussion_r4502592928
##########
airflow-core/tests/unit/models/test_trigger.py:
##########
@@ -180,6 +180,96 @@ def test_clean_unused(session, dag_maker):
assert {result.id for result in results} == {trigger1.id, trigger4.id,
trigger5.id, trigger6.id}
+def _create_unused_trigger(session) -> int:
+ trigger = Trigger(classpath="airflow.triggers.testing.SuccessTrigger",
kwargs={})
+ session.add(trigger)
+ session.commit()
+ return trigger.id
+
+
+def _clean_unused_adding_reference_before_delete(session, trigger_id,
add_reference):
Review Comment:
Renamed to _clean_unused_while_adding_reference as you suggested, with a
docstring saying it adds the reference right before the DELETE.
--
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]