示例#1
0
 def deserialize(data):
     return SystemID(
         data[SystemID.SERIAL_NAME_ID_KEY],
         version_id=Version.deserialize(data[SystemID.SERIAL_VERSION_ID_KEY]),
         biiType=BiiType.deserialize(data[SystemID.SERIAL_BIITYPE_KEY]),
         language_version=Version.deserialize(data[SystemID.SERIAL_LANGUAGE_VERSION_KEY]),
         os_info=OSInfo.deserialize(data[SystemID.SERIAL_OS_INFO_KEY]),
         tool_info=ToolInfo.deserialize(data[SystemID.SERIAL_TOOL_INFO_KEY]),
         path=data[SystemID.SERIAL_PATH_KEY],
     )
    def test_bii_type(self):
        b1 = BiiType(SOUND)
        s1 = serialize(b1)

        b2 = BiiType.deserialize(s1)
        self.assertEqual(b1, b2)
示例#3
0
    def test_bii_type(self):
        b1 = BiiType(SOUND)
        s1 = serialize(b1)

        b2 = BiiType.deserialize(s1)
        self.assertEqual(b1, b2)