def _make_app(self): file_name = self.path_get('etc/aodh/api_paste.ini') self.CONF.set_override("paste_config", file_name, "api") # We need the other call to prepare_service in app.py to return the # same tweaked conf object. with mock.patch('aodh.service.prepare_service') as ps: ps.return_value = self.CONF return webtest.TestApp(app.load_app(conf=self.CONF))
def setUp(self): super(FunctionalTest, self).setUp() conf = service.prepare_service(argv=[], config_files=[]) self.CONF = self.useFixture(fixture_config.Config(conf)).conf self.setup_messaging(self.CONF) self.CONF.set_override('auth_mode', None, group='api') self.app = webtest.TestApp(app.load_app(self.CONF))
def setup_app(): global LOAD_APP_KWARGS return app.load_app(**LOAD_APP_KWARGS)
def setup_app(): conf = service.prepare_service([]) return app.load_app(conf)
def _make_app(self): self.CONF.set_override("cache", "fake.cache", group=acl.OPT_GROUP_NAME) file_name = self.path_get('etc/aodh/api_paste.ini') self.CONF.set_override("api_paste_config", file_name) return webtest.TestApp(app.load_app())