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


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_xcom.py:
##########
@@ -683,11 +682,50 @@ def test_patch_xcom_entry(self, key, patch_body, 
expected_status, expected_detai
         assert response.status_code == expected_status
 
         if expected_status == 200:
-            assert response.json()["value"] == 
XComModel.serialize_value(new_value)
+            # The returned value should be serialized once (stored format in 
DB)
+            expected_value = XComModel.serialize_value(patch_body["value"])
+            assert response.json()["value"] == expected_value
         else:
             assert response.json()["detail"] == expected_detail
         check_last_log(session, dag_id=TEST_DAG_ID, event="update_xcom_entry", 
logical_date=None)
 
+    def test_patch_xcom_entry_value_usability(self, test_client, session):
+        """Test that patched XCom values can be retrieved and used correctly 
without excessive serialization."""
+        # Create initial XCom
+        self._create_xcom(TEST_XCOM_KEY, 1)

Review Comment:
   Lets use a tuple instead? That would ensure the ser/deser works fine.



-- 
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]

Reply via email to