def test_read_empty_struct():
    b = TCyMemoryBuffer(b"\x00")
    b = proto.TCyBinaryProtocol(b)
    _item = TItem()
    _item2 = TItem()
    b.read_struct(_item2)
    assert _item == _item2
def test_read_struct():
    b = TCyMemoryBuffer(b"\x08\x00\x01\x00\x00\x00{"
                        b"\x0f\x00\x02\x0b\x00\x00\x00"
                        b"\x02\x00\x00\x00\x06123456"
                        b"\x00\x00\x00\x06abcdef\x00")
    b = proto.TCyBinaryProtocol(b)
    _item = TItem(id=123, phones=["123456", "abcdef"])
    _item2 = TItem()
    b.read_struct(_item2)
    assert _item == _item2