From 46187b250752c5d6f0930cb9c6ce1ed741eb8ce0 Mon Sep 17 00:00:00 2001 From: yangdx Date: Sat, 27 Sep 2025 21:43:46 +0800 Subject: [PATCH] Fix conditional logic in streaming response parser of unit test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Change elif to if for response field • Change elif to if for error field • Allow multiple data types per chunk • Fix mutually exclusive conditions • Enable concurrent field processing --- tests/test_aquery_data_endpoint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_aquery_data_endpoint.py b/tests/test_aquery_data_endpoint.py index 3e89be6f..8845cb79 100644 --- a/tests/test_aquery_data_endpoint.py +++ b/tests/test_aquery_data_endpoint.py @@ -72,9 +72,9 @@ def parse_streaming_response( if "references" in data: references = data["references"] - elif "response" in data: + if "response" in data: response_chunks.append(data["response"]) - elif "error" in data: + if "error" in data: errors.append(data["error"]) except json.JSONDecodeError: