ephraimbuddy commented on a change in pull request #17556:
URL: https://github.com/apache/airflow/pull/17556#discussion_r691171385
##########
File path: tests/models/test_dagbag.py
##########
@@ -312,22 +314,20 @@ def process_file(self, filepath, only_if_updated=True,
safe_mode=True):
assert dag_id == dag.dag_id
assert 2 == dagbag.process_file_calls
- def test_dag_removed_if_serialized_dag_is_removed(self):
+ def test_dag_removed_if_serialized_dag_is_removed(self, dag_maker):
"""
Test that if a DAG does not exist in serialized_dag table (as the DAG
file was removed),
remove dags from the DagBag
"""
from airflow.operators.dummy import DummyOperator
- dag = models.DAG(
+ with dag_maker(
dag_id="test_dag_removed_if_serialized_dag_is_removed",
schedule_interval=None,
start_date=tz.datetime(2021, 10, 12),
- )
-
- with dag:
+ ) as dag:
DummyOperator(task_id="task_1")
-
+ dag_maker.create_dagrun()
Review comment:
Ok. I will remove it.
--
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]