Beispiel #1
0
def session_setup(session, path, index=0):
    _keys = session.keys()
    for key in _keys:
        if key.startswith("_"):
            continue
        elif key in [
                "tests", "graph", "flow_names", "response_type", "test_info",
                "profiles"
        ]:  # don't touch !
            continue
        else:
            del session[key]

    ots = OIDCTestSetup(CONF, TEST_FLOWS, str(CONF.PORT))
    session["testid"] = path
    session["node"] = in_tree(session["graph"], path)
    sequence_info = ots.make_sequence(path)
    sequence_info = ots.add_init(sequence_info)
    session["seq_info"] = sequence_info
    trace = Trace()
    client_conf = ots.config.CLIENT
    conv = Conversation(ots.client, client_conf, trace, None, message_factory,
                        check_factory)
    conv.cache = CACHE
    session["ots"] = ots
    session["conv"] = conv
    session["index"] = index
    session["response_type"] = ""

    return conv, sequence_info, ots, trace, index
Beispiel #2
0
def session_setup(session, path, index=0):
    _keys = session.keys()
    for key in _keys:
        if key.startswith("_"):
            continue
        elif key in ["tests", "graph", "flow_names", "response_type",
                     "test_info", "profiles"]:  # don't touch !
            continue
        else:
            del session[key]

    ots = OIDCTestSetup(CONF, TEST_FLOWS, str(CONF.PORT))
    session["testid"] = path
    session["node"] = in_tree(session["graph"], path)
    sequence_info = ots.make_sequence(path)
    sequence_info = ots.add_init(sequence_info)
    session["seq_info"] = sequence_info
    trace = Trace()
    client_conf = ots.config.CLIENT
    conv = Conversation(ots.client, client_conf, trace, None,
                        message_factory, check_factory)
    conv.cache = CACHE
    session["ots"] = ots
    session["conv"] = conv
    session["index"] = index
    session["response_type"] = ""

    return conv, sequence_info, ots, trace, index
Beispiel #3
0
 def client_init(self):
     ots = OIDCTestSetup(CONF, TEST_FLOWS.FLOWS, str(CONF.PORT), UmaClient)
     client_conf = ots.config.CLIENT
     trace = Trace()
     conv = Conversation(ots.client, client_conf, trace, None,
                         uma_message_factory, check_factory)
     conv.cache = self.cache
     conv.check_factory = self.check_factory
     return ots, conv
Beispiel #4
0
 def client_init(self):
     ots = OIDCTestSetup(self.conf, self.test_flows, str(self.conf.PORT))
     client_conf = ots.config.CLIENT
     trace = Trace()
     conv = Conversation(ots.client, client_conf, trace, None,
                         message_factory, self.check_factory)
     conv.cache = self.cache
     conv.check_factory = self.check_factory
     return ots, conv
Beispiel #5
0
 def client_init(self):
     ots = OIDCTestSetup(self.conf, self.test_flows, str(self.conf.PORT))
     client_conf = ots.config.CLIENT
     trace = Trace()
     conv = Conversation(ots.client, client_conf, trace, None,
                         message_factory, self.check_factory)
     conv.cache = self.cache
     conv.check_factory = self.check_factory
     return ots, conv
Beispiel #6
0
 def client_init(self):
     ots = OIDCTestSetup(CONF, TEST_FLOWS.FLOWS, str(CONF.PORT), UmaClient)
     client_conf = ots.config.CLIENT
     trace = Trace()
     conv = Conversation(ots.client, client_conf, trace, None,
                         uma_message_factory, check_factory)
     conv.cache = self.cache
     conv.check_factory = self.check_factory
     return ots, conv