示例#1
0
文件: web_ui.py 项目: nagyist/agilo
 def config_reloaded(self):
     """Recreate mapping dictionaries when needed"""
     config = AgiloConfig(self.env)
     if config.ALIASES is not None:
         self._alias_to_type = dict(
             zip(config.ALIASES.values(), config.ALIASES.keys()))
     self.cp = CommandParser(self.env, config.ALIASES, self._alias_to_type)
示例#2
0
 def setUp(self):
     """Creates the needed environment"""
     self.super()
     alias_mapping = AgiloConfig(self.env).ALIASES
     type_mapping = dict(zip(alias_mapping.values(), alias_mapping.keys()))
     self.cp = CommandParser(self.env, type_mapping, alias_mapping)