ephraimbuddy commented on code in PR #47592:
URL: https://github.com/apache/airflow/pull/47592#discussion_r2120373388
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_tasks.py:
##########
@@ -235,7 +237,14 @@ def test_should_respond_200_serialized(self, test_client,
testing_dag_bundle):
task2 = EmptyOperator(task_id=self.task_id2,
start_date=self.task2_start_date)
task1 >> task2
-
+ bundle_name = "testing"
+ session = settings.Session()
+ orm_dag_bundle = DagBundleModel(name=bundle_name)
+ session.merge(orm_dag_bundle)
+ session.flush()
+ dag_model = DagModel(dag_id=dag.dag_id, bundle_name=bundle_name)
+ session.merge(dag_model)
+ session.flush()
Review Comment:
```suggestion
```
Won't `dag.sync_to_db()` below do the same thing? Maybe the bundle_name
should be `test_bundle` as used in SerializedDagModel
--
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]