def setUpClass(cls): cls.parser = configparser.ConfigParser( interpolation=configparser.ExtendedInterpolation()) cls.parser.read_string(CONFIG) cls.log_handlers = log.auditlog.logger.handlers[:] log.auditlog.logger.handlers = [logging.NullHandler()] cls.secrets = Secrets(cls.parser, 'authz:secrets') cls.secrets.root.store = SqliteStore(cls.parser, 'store:sqlite') cls.authz = UserNameSpace(cls.parser, 'authz:user')
def __init__(self, config, section): super(Root, self).__init__(config, section) if self.store_name is not None: self.add_sub('secrets', Secrets(config, section))
def __init__(self, *args, **kwargs): super(Root, self).__init__(*args, **kwargs) if self.store_name is not None: self.add_sub('secrets', Secrets(self.config))