def run_test(test_id): io = SamlClIO(**app_args) sh = SessionHandler(session={}, **app_args) sh.init_session({}, profile=app_args['profile']) tester = Tester(io, sh, **app_args) tester.setup(test_id, **app_args) flask.session["events"] = tester.conv.events flask.session["trace"] = tester.conv.trace print("TRACE", tester.conv.trace) return tester.run(test_id, **app_args)
def setup_tester(): test_id, app_args = setup('wb') events = flask.session["events"] if not test_id: test_id = events.get('test_id')[0].data io = SamlClIO(**app_args) sh = SessionHandler(session={}, **app_args) sh.init_session({}, profile=app_args['profile']) tester = Tester(io, sh, **app_args) tester.setup(test_id, **app_args) tester.conv.events = flask.session["events"] tester.conv.trace = flask.session['trace'] tester.conv.base_url = app_args["base_url"] tester.conv.test_id = test_id return tester, app_args