From fbea5f04bccd28f3aa15a1711548b131504591ac Mon Sep 17 00:00:00 2001 From: Taras Date: Tue, 10 Oct 2017 00:13:16 +0300 Subject: Refactor MessageSet and Message into LegacyRecordBatch to later support v2 message format --- test/test_protocol.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/test_protocol.py') diff --git a/test/test_protocol.py b/test/test_protocol.py index 0203614..d963650 100644 --- a/test/test_protocol.py +++ b/test/test_protocol.py @@ -260,13 +260,14 @@ def test_decode_fetch_response_partial(): struct.pack('>i', 8), # Length of value b'ar', # Value (truncated) ]) - resp = FetchResponse[0].decode(io.BytesIO(encoded)) assert len(resp.topics) == 1 topic, partitions = resp.topics[0] assert topic == 'foobar' assert len(partitions) == 2 - m1 = partitions[0][3] + + m1 = MessageSet.decode( + partitions[0][3], bytes_to_read=len(partitions[0][3])) assert len(m1) == 2 assert m1[1] == (None, None, PartialMessage()) -- cgit v1.2.1