Example #1
0
    def test_string_decode_encode(self):
        from QGIS_FMV.klvdata.common import bytes_to_str
        from QGIS_FMV.klvdata.common import str_to_bytes

        self.assertEqual(
            str_to_bytes(bytes_to_str(b'\x50\x72\x65\x64\x61\x74\x6F\x72')),
            b'\x50\x72\x65\x64\x61\x74\x6F\x72')
Example #2
0
 def __bytes__(self):
     return str_to_bytes(self.value)