def test_datetime_decode_encode(self): from klvdata.common import datetime_to_bytes from klvdata.common import bytes_to_datetime self.assertEqual( datetime_to_bytes( bytes_to_datetime(b'\x00\x04\x60\x50\x58\x4E\x01\x80')), b'\x00\x04\x60\x50\x58\x4E\x01\x80')
def __init__(self, value): self.value = bytes_to_datetime(value)