示例#1
0
 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 _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))
示例#3
0
文件: __init__.py 项目: yi-cloud/aodh
    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))
示例#4
0
def setup_app():
    global LOAD_APP_KWARGS
    return app.load_app(**LOAD_APP_KWARGS)
示例#5
0
def setup_app():
    conf = service.prepare_service([])
    return app.load_app(conf)
示例#6
0
 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())