ashb commented on code in PR #44723:
URL: https://github.com/apache/airflow/pull/44723#discussion_r1873348392
##########
task_sdk/tests/api/test_client.py:
##########
@@ -82,6 +85,88 @@ def make_client(transport: httpx.MockTransport) -> Client:
return Client(base_url="test://server", token="", transport=transport)
+class TestTaskInstanceOperations:
+ """
+ Test that the TestVariableOperations class works as expected. While the
operations are simple, it
+ still catches the basic functionality of the client for task instances
including endpoint and
+ response parsing.
+ """
+
+ def test_task_instance_start(self):
+ # Simulate a successful response from the server that starts a task
+ ti_id = uuid6.uuid7()
+
+ def handle_request(request: httpx.Request) -> httpx.Response:
+ if request.url.path == f"/task-instances/{ti_id}/state":
+ return httpx.Response(
+ status_code=204,
+ )
Review Comment:
We should probably assert something about the request body/payload here I
think.
--
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]