def test_decode_null(self): (val, rest) = Bytes.decode(b'\xff\xff') assert isinstance(val, Bytes) assert val.value() is None assert rest == b''
def test_decode_remainder(self): (val, rest) = Bytes.decode(b'\x00\x04\x87\x34\x9d\xbcabc') assert rest == b'abc'
def test_decode(self): (val, rest) = Bytes.decode(b'\x00\x04\x87\x34\x9d\xbc') assert isinstance(val, Bytes) assert val.value() == b'\x87\x34\x9d\xbc' assert rest == b''