def test_with_header_iobuf_binary(self) -> None: control = easy(val=6, val_list=[5, 4, 3, 2, 1]) iobuf = serialize_with_header_iobuf( control, protocol=Protocol.BINARY, transform=Transform.ZLIB_TRANSFORM ) decoded = deserialize_from_header(easy, iobuf) self.assertEqual(control, decoded)
def test_with_header_iobuf_json(self) -> None: control = easy(val=4, val_list=[3, 2, 1]) iobuf = serialize_with_header_iobuf(control, protocol=Protocol.JSON) decoded = deserialize_from_header(easy, iobuf) self.assertEqual(control, decoded)
def test_with_header_iobuf(self) -> None: control = easy(val=5, val_list=[4, 3, 2, 1]) iobuf = serialize_with_header_iobuf(control, transform=Transform.ZSTD_TRANSFORM) decoded = deserialize_from_header(easy, iobuf) self.assertEqual(control, decoded)