Added logging for each step of the sequence's flow so it's easier to

understand where something goes wrong if a test fails.
This commit is contained in:
rmokiem-topdesk
2013-12-31 12:50:36 +01:00
parent 2c3c3e8651
commit 04dac3636d

View File

@@ -315,13 +315,19 @@ class Conversation():
Un-solicited starts with the IDP sending something. Un-solicited starts with the IDP sending something.
""" """
if len(flow) >= 3: if len(flow) >= 3:
logger.info("TEST FLOW: Start by GET-ing the page")
self.wb_send() self.wb_send()
logger.info("TEST FLOW: Continuing with: %s" % flow[0].__name__)
self.intermit(flow[0]._interaction) self.intermit(flow[0]._interaction)
logger.info("TEST FLOW: Handling redirect")
self.handle_redirect() self.handle_redirect()
logger.info("TEST FLOW: Sending IdP Response with expected request %s and response to be used %s" % flow[1].__name__, flow[2].__name__)
self.send_idp_response(flow[1], flow[2]) self.send_idp_response(flow[1], flow[2])
if len(flow) == 4: if len(flow) == 4:
logger.info("TEST FLOW Handling result with HTTP Response check for %s" % flow[3].__name__)
self.handle_result(flow[3]) self.handle_result(flow[3])
else: else:
logger.info("TEST FLOW: Handling result (without HTTP Response check)")
self.handle_result() self.handle_result()
def do_sequence(self, oper, tests=None): def do_sequence(self, oper, tests=None):