def init_plugin(self, config_content=None):
conf = None
if config_content:
conf = XmlConfigParser()
conf.setXml(config_content)
elif ADV_CONFIG_CONTENT:
conf = XmlConfigParser()
conf.setXml(ADV_CONFIG_CONTENT)
else:
unittest.skip("cannot get default plugin config file at %s" % ADV_CONFIG_FILE)
self.p = AdvPlugin(self.console, conf)
self.p.save = Mock()
self.conf = self.p.config
self.log.setLevel(logging.DEBUG)
self.log.info("============================= Adv plugin: loading config ============================")
self.p.onLoadConfig()
self.log.info("============================= Adv plugin: starting =================================")
self.p.onStartup()
评论列表
文章目录