amoghrajesh commented on code in PR #76892:
URL: https://github.com/apache/airflow/pull/76892#discussion_r4534469633
##########
airflow-core/tests/unit/api_fastapi/execution_api/versions/head/test_xcoms.py:
##########
@@ -1659,6 +1659,21 @@ def test_xcom_delete_endpoint(self, client,
create_task_instance, authenticate_a
assert verify.get(XComModelV1, (ti.dag_run.id, ti.task_id,
ti.map_index, "xcom_1")) is None
assert XComModelV2.get_for_attempt(ti1.id, "xcom_1",
session=verify) is not None
+ def test_xcom_delete_rejects_loop_reserved_prefix(
Review Comment:
The test only checks `status_code == 400`. `_find_writer_id` also returns a
400 when the target is in a loop the caller is not in, so a later setup change
could make the test pass for the wrong reason.
Considering adding a `assert response.json()["detail"] == "Reserved loop
XCom key"`.
--
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]