jason810496 commented on code in PR #55257:
URL: https://github.com/apache/airflow/pull/55257#discussion_r2349281979
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py:
##########
@@ -305,3 +307,72 @@ def test_should_respond_404_invalid_map_index(self,
test_client):
)
assert response.status_code == 404
assert response.json() == {"detail": "TaskInstance not found"}
+
+ def test_parameterized_extra_links_dag(self, dag_maker, test_client,
session):
+ with dag_maker(dag_id="parameterized_extra_links_dag",
serialized=True):
+
+ @task
+ def get_api_resource(extra_links: dict[str, str]):
+ rsp = requests.get("https://www.google.com", timeout=10)
+ extra_links["Google"] = "https://www.google.com"
+ return {"status_code": rsp.status_code}
+
+ get_api_resource(extra_links={})
+
+ dagrun = dag_maker.create_dagrun(
+ run_id="test_run",
+ logical_date=self.default_time,
+ state=DagRunState.RUNNING,
+ run_type=DagRunType.MANUAL,
+ data_interval=(self.default_time, self.default_time),
+ session=session,
+ )
+
+ tis = dagrun.get_task_instances(session=session)
+ assert tis, f"No task instances created for DAG {dagrun.dag_id}"
Review Comment:
We should replace all the `DAG` usage with `Dag` among the change
--
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]