def testGetPluginList(self): print 'Before testGetPluginList {0}'.format(os.getcwd()) os.chdir('../') pluginsList = getPluginList() _, dirs, _ = os.walk('plugins').next() os.chdir('tst/') self.assertEquals(dirs, pluginsList)
def initApp(api): homeDir = os.getcwd() if homeDir.find('/var/www') != -1: homeDir = '/var/www/geomongo/' os.chdir(homeDir) else: if homeDir.find('src/tst') != -1: os.chdir('..') pluginList = getPluginList() for pluginName in pluginList: if getPluginState(pluginName) is True and \ checkConfigPlugin(pluginName) is True: enablePlugin(api, pluginName) os.chdir(homeDir)
def get(self): list_plugins = getPluginList() result = {} for plugin in list_plugins: result.update({plugin: getPluginInfo(plugin)}) return result