Beispiel #1
0
def get_request_index_hash_key(session, stub_number):
    '''
    Return the self.hash_cls() of the scenario_name+matchers
    '''
    scenario_key = session['scenario']
    session_name = session['session']
    scenario_name = scenario_key.partition(':')[-1]
    matching_stub = StubCache(session['stubs'][stub_number], scenario_key,
                              session_name)
    matchers = u"".join([u''.join(
        x.split()).strip() for x in matching_stub.contains_matchers()])
    return compute_hash(u"".join([scenario_name, matchers]))