From c5f82e6176190c47d247c982d98150901daebfbc Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 20 Jan 2025 14:23:59 +0800 Subject: [PATCH] test: debug received data --- src/steps/da.py | 2 +- tests/data_integrity/test_data_integrity.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/steps/da.py b/src/steps/da.py index 50e58a6..72ff684 100644 --- a/src/steps/da.py +++ b/src/steps/da.py @@ -38,5 +38,5 @@ class StepsDataAvailability(StepsCommon): # Extract data as a string for each index in the received order parsed_data = [] for item in response_bytes.content: - parsed_data.append(item.decode("utf-8")) + parsed_data.append(item) return parsed_data diff --git a/tests/data_integrity/test_data_integrity.py b/tests/data_integrity/test_data_integrity.py index a993ad6..7b765d5 100644 --- a/tests/data_integrity/test_data_integrity.py +++ b/tests/data_integrity/test_data_integrity.py @@ -1,8 +1,11 @@ import pytest +from src.libs.custom_logger import get_custom_logger from src.steps.da import StepsDataAvailability from src.test_data import DATA_TO_DISPERSE +logger = get_custom_logger(__name__) + @pytest.mark.usefixtures("setup_main_nodes") class TestDataIntegrity(StepsDataAvailability): @@ -15,4 +18,5 @@ class TestDataIntegrity(StepsDataAvailability): def test_da_sampling_determines_data_presence(self): self.disperse_data(DATA_TO_DISPERSE[0], [0] * 31 + [1], [0] * 8) received_data = self.get_data_range([0] * 31 + [1], [0] * 8, [0] * 7 + [5]) + logger.debug(f"received data {received_data}") assert DATA_TO_DISPERSE[0] == received_data[0]