Update tests/logging_callback_tests/test_gcs_pub_sub.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Harshit Jain 2026-03-02 17:15:34 +05:30 committed by GitHub
parent 47fea2acdf
commit aeae28bda3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -82,6 +82,7 @@ def extract_pubsub_payload(mock_post: AsyncMock) -> dict:
Handles base64 decoding of the Pub/Sub message data.
"""
actual_request = mock_post.call_args[1]["json"]
assert "messages" in actual_request, f"Expected 'messages' key in Pub/Sub request, got keys: {list(actual_request.keys())}"
encoded_message = actual_request["messages"][0]["data"]
decoded_message = base64.b64decode(encoded_message).decode("utf-8")
return json.loads(decoded_message)