diff options
author | Taras <voyn1991@gmail.com> | 2017-10-10 00:13:16 +0300 |
---|---|---|
committer | Taras <voyn1991@gmail.com> | 2017-10-11 18:09:17 +0300 |
commit | fbea5f04bccd28f3aa15a1711548b131504591ac (patch) | |
tree | 1c8a0efe687c2ace72fa146b4f03e15def8e3a95 /test/test_protocol.py | |
parent | f04435c5ed97fef0975a77a8dc7bae7c284bba63 (diff) | |
download | kafka-python-fbea5f04bccd28f3aa15a1711548b131504591ac.tar.gz |
Refactor MessageSet and Message into LegacyRecordBatch to later support v2 message format
Diffstat (limited to 'test/test_protocol.py')
-rw-r--r-- | test/test_protocol.py | 5 |
1 files changed, 3 insertions, 2 deletions
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()) |