def init_mock_addon(short_name, user_settings=None, node_settings=None):
 import factories
 user_settings = (user_settings or factories.MockAddonUserSettings)
 node_settings = (node_settings or factories.MockAddonNodeSettings)
 settings.ADDONS_REQUESTED.append(short_name)
 addon_config = AddonConfig(short_name=short_name, full_name=short_name, owners=['User', 'Node'], categories=['Storage'], user_settings_model=user_settings, node_settings_model=node_settings, models=[user_settings, node_settings])
 settings.ADDONS_AVAILABLE_DICT[addon_config.short_name] = addon_config
 settings.ADDONS_AVAILABLE.append(addon_config)
 return addon_config

def init_mock_addon ( short_name , user_settings = None , node_settings = None ) : import factories user_settings = ( user_settings or factories . MockAddonUserSettings ) node_settings = ( node_settings or factories . MockAddonNodeSettings ) settings . ADDONS_REQUESTED . append ( short_name ) addon_config = AddonConfig ( short_name = short_name , full_name = short_name , owners = [ 'User' , 'Node' ] , categories = [ 'Storage' ] , user_settings_model = user_settings , node_settings_model = node_settings , models = [ user_settings , node_settings ] ) settings . ADDONS_AVAILABLE_DICT [ addon_config . short_name ] = addon_config settings . ADDONS_AVAILABLE . append ( addon_config ) return addon_config
add an addon to the settings .