def _make_app(self, conf): content = ('{"context_is_admin": "role:admin",' '"telemetry:events:index": "rule:context_is_admin",' '"telemetry:events:show": "rule:context_is_admin"}') if six.PY3: content = content.encode('utf-8') self.tempfile = fileutils.write_to_tempfile(content=content, prefix='policy', suffix='.json') conf.set_override("policy_file", self.tempfile, group='oslo_policy') return webtest.TestApp(app.load_app(conf, appname='panko+noauth'))
def _make_app(conf): return webtest.TestApp(app.load_app(conf, appname='panko+noauth'))
def setup_app(): global LOAD_APP_KWARGS return app.load_app(**LOAD_APP_KWARGS)
def _make_app(conf): return webtest.TestApp(app.load_app(conf, appname='panko+keystone'))
def _make_app(self, conf): file_name = self.path_get('etc/panko/api_paste.ini') conf.set_override("api_paste_config", file_name) return webtest.TestApp(app.load_app(conf=conf))