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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_import_error.py:
##########
@@ -51,7 +52,17 @@
 @pytest.fixture(scope="class")
 @provide_session
 def permitted_dag_model(session: Session = NEW_SESSION) -> DagModel:
-    dag_model = DagModel(fileloc=FILENAME1, relative_fileloc=FILENAME1, 
dag_id="dag_id1", is_paused=False)
+    orm_dag_bundle = DagBundleModel(name=BUNDLE_NAME)
+    session.merge(orm_dag_bundle)

Review Comment:
   I believe merge is safer, avoiding the potential conflicts. I assume someone 
might duplicate these lines creating other bundle/dag under the same test.



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