jedcunningham commented on code in PR #47592:
URL: https://github.com/apache/airflow/pull/47592#discussion_r2214685150


##########
airflow-core/tests/unit/api_fastapi/common/db/test_dags.py:
##########
@@ -52,11 +54,17 @@ def setup_teardown(self):
     def dag_with_queued_run(self, session):
         """Returns a DAG with a QUEUED DagRun and null start_date."""
 
+        bundle_name = "testing"
+        orm_dag_bundle = DagBundleModel(name=bundle_name)

Review Comment:
   Can't this fixture also use the 'testing_dag_bundle' fixture?



##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_backfills.py:
##########
@@ -92,10 +95,16 @@ def to_iso(val):
 class TestBackfillEndpoint:
     @provide_session
     def _create_dag_models(self, *, count=1, dag_id_prefix="TEST_DAG", 
is_paused=False, session=None):
+        bundle_name = "dags-folder"
+        orm_dag_bundle = DagBundleModel(name=bundle_name)

Review Comment:
   Can the class use the fixture instead?



##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dag_warning.py:
##########
@@ -40,11 +41,17 @@
 @provide_session
 def setup(dag_maker, session=None) -> None:
     clear_db_dags()
+    clear_db_dag_bundles()
     clear_db_dag_warnings()
 
-    session.add(DagModel(dag_id=DAG1_ID))
-    session.add(DagModel(dag_id=DAG2_ID))
-    session.add(DagModel(dag_id=DAG3_ID))
+    bundle_name = "test_bundle"
+    orm_dag_bundle = DagBundleModel(name=bundle_name)

Review Comment:
   Just use the fixture for this fixture.



##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_backfills.py:
##########
@@ -92,10 +95,16 @@ def to_iso(val):
 class TestBackfillEndpoint:
     @provide_session
     def _create_dag_models(self, *, count=1, dag_id_prefix="TEST_DAG", 
is_paused=False, session=None):
+        bundle_name = "dags-folder"
+        orm_dag_bundle = DagBundleModel(name=bundle_name)

Review Comment:
   (not going to repeat this comment, but it does apply to more than here)



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