pateash commented on code in PR #24902:
URL: https://github.com/apache/airflow/pull/24902#discussion_r945339312


##########
tests/sensors/test_external_task_sensor.py:
##########
@@ -54,12 +58,24 @@ def setUp(self):
         self.args = {'owner': 'airflow', 'start_date': DEFAULT_DATE}
         self.dag = DAG(TEST_DAG_ID, default_args=self.args)
 
-    def test_time_sensor(self, task_id=TEST_TASK_ID):
+    def add_time_sensor(self, task_id=TEST_TASK_ID):
         op = TimeSensor(task_id=task_id, target_time=time(0), dag=self.dag)
         op.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, 
ignore_ti_state=True)
 
+    def add_dummy_task_group(self, target_states=None):
+        target_states = [State.SUCCESS] * 2 if target_states is None else 
target_states
+        with self.dag as dag:
+            with TaskGroup(group_id=TEST_TASK_GROUP_ID) as task_group:
+                _ = [DummyOperator(task_id=f"task{i}") for i in 
range(len(target_states))]

Review Comment:
   Sure, done.



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

Reply via email to