def session_setup(self, session=None, path="", index=0): logger.info("session_setup") if session is None: session = self.session _keys = list(session.keys()) for key in _keys: if key.startswith("_"): continue elif key in [ "tests", "flow_names", "response_type", "test_info", "profile" ]: # don't touch ! continue else: del session[key] session["testid"] = path for node in session["tests"]: if node.name == path: session["node"] = node break if "node" not in session: raise Exception("Unknown node name: {}".format(path)) session["flow"] = self.test_flows[path] session["sequence"] = copy.deepcopy(session["flow"]["sequence"]) session["sequence"].append(Done) session["index"] = index self.session = session
def session_setup(self, session=None, path="", index=0): logger.info("session_setup") if session is None: session = self.session _keys = list(session.keys()) for key in _keys: if key.startswith("_"): continue elif key in ["tests", "flow_names", "response_type", "test_info", "profile"]: # don't touch ! continue else: del session[key] session["testid"] = path for node in session["tests"]: if node.name == path: session["node"] = node break if "node" not in session: raise Exception("Unknown node name: {}".format(path)) session["flow"] = self.test_flows[path] session["sequence"] = copy.deepcopy(session["flow"]["sequence"]) session["sequence"].append(Done) session["index"] = index self.session = session
def reset_session(self, session=None, profile=None): if not session: session = self.session _keys = list(session.keys()) for key in _keys: if key.startswith("_"): continue else: del session[key] self.init_session(session, profile)