Exemple #1
0
    def init_assetmap(self):
        """ Find DCP AssetMap and build Asset List. """
        self._list_am_path = self.filter_files(['ASSETMAP', 'ASSETMAP.xml'])
        self._list_am = [assetmap_parse(f) for f in self._list_am_path]

        # In the improbable case of multiple Assetmap found in the folder,
        # flatten asset list.
        self._list_asset = [{
            uuid: path
            for a in self._list_am
            for uuid, path, _ in list_am_assets(a)}]
        self._list_asset = {
            k: v for _list_asset in self._list_asset
            for k, v in six.iteritems(_list_asset)}

        # Schema (IOP or SMPTE) is assumed to be the one found for the Assetmap
        if self._list_am:
            self.schema = self._list_am[0]['Info']['AssetMap']['Schema']
 def parse_and_check_schema(self, name, schema):
     am = assetmap_parse(self.get_file_path(name))
     self.assertIsNotNone(am)
     self.assertEqual(am['Info']['AssetMap']['Schema'], schema)
     return am