Beispiel #1
0
 def test_decode_null(self):
     (val, rest) = Bytes.decode(b'\xff\xff')
     assert isinstance(val, Bytes)
     assert val.value() is None
     assert rest == b''
Beispiel #2
0
 def test_decode_remainder(self):
     (val, rest) = Bytes.decode(b'\x00\x04\x87\x34\x9d\xbcabc')
     assert rest == b'abc'
Beispiel #3
0
 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''