amoghrajesh commented on code in PR #44562:
URL: https://github.com/apache/airflow/pull/44562#discussion_r1868858494


##########
task_sdk/tests/api/test_client.py:
##########
@@ -133,3 +134,21 @@ def handle_request(request: httpx.Request) -> 
httpx.Response:
                 "reason": "not_found",
             }
         }
+
+    def test_variable_set_success(self):
+        # Simulate a successful response from the server when putting a 
variable
+        def handle_request(request: httpx.Request) -> httpx.Response:
+            if request.url.path == "/variables/test_key":
+                return httpx.Response(
+                    status_code=200,
+                    json={"ok": True},
+                )
+            return httpx.Response(status_code=400, json={"detail": "Bad 
Request"})
+
+        client = make_client(transport=httpx.MockTransport(handle_request))
+
+        msg = PutVariable(
+            key="test_key", value="test_value", 
description="test_description", type="PutVariable"

Review Comment:
   Removed



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to