amoghrajesh commented on code in PR #44605:
URL: https://github.com/apache/airflow/pull/44605#discussion_r1868909533
##########
task_sdk/tests/api/test_client.py:
##########
@@ -133,3 +133,33 @@ def handle_request(request: httpx.Request) ->
httpx.Response:
"reason": "not_found",
}
}
+
+
+class TestXCOMOperations:
+ """
+ Test that the XComOperations class works as expected. While the operations
are simple, it
+ still catches the basic functionality of the client for xcoms including
endpoint and
+ response parsing.
+ """
+
+ # TODO: Add tests for get xcom in a follow up
+
+ def test_xcom_set_success(self):
+ # Simulate a successful response from the server when setting an xcom
+ def handle_request(request: httpx.Request) -> httpx.Response:
+ if request.url.path == "/xcoms/dag_id/run_id/task_id/key":
+ return httpx.Response(
+ status_code=200,
Review Comment:
Right. And also `{"message": "XCom successfully set"},`
--
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]