def setup_app(config=None): if not config: config = get_pecan_config() app_conf = dict(config.app) app = pecan.make_app(app_conf.pop('root'), logging=getattr(config, 'logging', {}), wrap_app=middleware.ParsableErrorMiddleware, **app_conf) # TBD Add test hook later # cpulseTimer(10, timerfunc, "Cpulse") cpulseTimer(30, timerfunc, "Cpulse") tm = Periodic_TestManager() tm.start() return auth.install(app, CONF, config.app.acl_public_routes)
def setup_app(config=None): if not config: config = get_pecan_config() app_conf = dict(config.app) app = pecan.make_app( app_conf.pop('root'), logging=getattr(config, 'logging', {}), wrap_app=middleware.ParsableErrorMiddleware, **app_conf ) # TBD Add test hook later # cpulseTimer(10, timerfunc, "Cpulse") cpulseTimer(30, timerfunc, "Cpulse") tm = Periodic_TestManager() tm.start() return auth.install(app, CONF, config.app.acl_public_routes)
def test_check_auth_option_disabled(self, mock_auth): self.CONF.config(enable_authentication=False) result = auth.install(self.app, self.CONF.conf, ['/']) self.assertIsInstance(result, fakes.FakeApp)
def test_check_auth_option_disabled(self, mock_auth): self.CONF.config(enable_authentication=False) result = auth.install(self.app, self.CONF.conf, ["/"]) self.assertIsInstance(result, fakes.FakeApp)