def same_value_of_key_in_all_sources(workspace, publ_type, name): with app.app_context(): sources = layman_util.get_internal_sources(publ_type) info = layman_util.get_publication_info(workspace, publ_type, name) info_method = { process_client.LAYER_TYPE: 'get_layer_info', process_client.MAP_TYPE: 'get_map_info', }[publ_type] with app.app_context(): partial_infos = layman_util.call_modules_fn(sources, info_method, [workspace, name]) for source, source_info in partial_infos.items(): for key, value in source_info.items(): if key in info: assert_util.assert_same_values_for_keys( expected=info[key], tested=value, missing_key_is_ok=True, path=f'[{source}]', )
def get_sources(): key = FLASK_SOURCES_KEY if key not in current_app.config: current_app.config[key] = get_internal_sources(MAP_TYPE) return current_app.config[key]