Beispiel #1
0
    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'))
Beispiel #2
0
 def _make_app(conf):
     return webtest.TestApp(app.load_app(conf, appname='panko+noauth'))
Beispiel #3
0
def setup_app():
    global LOAD_APP_KWARGS
    return app.load_app(**LOAD_APP_KWARGS)
Beispiel #4
0
def setup_app():
    global LOAD_APP_KWARGS
    return app.load_app(**LOAD_APP_KWARGS)
Beispiel #5
0
 def _make_app(conf):
     return webtest.TestApp(app.load_app(conf, appname='panko+keystone'))
Beispiel #6
0
 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))