def create_scenario(actions, logs=None):
 keys = [str(i) for i in range(len(actions))]
 key_provider = create_mock_key_provider(keys)
 digest_provider = MockDigestProvider(actions, logs)
 digest_validator = Mock()
 def validate(bucket, key, public_key, digest_data, digest_str):
  if ('_invalid' in digest_data):
   raise DigestError('invalid error')
 digest_validator.validate = validate
 return (key_provider, digest_provider, digest_validator)

def create_scenario ( actions , logs = None ) : keys = [ str ( i ) for i in range ( len ( actions ) ) ] key_provider = create_mock_key_provider ( keys ) digest_provider = MockDigestProvider ( actions , logs ) digest_validator = Mock ( ) def validate ( bucket , key , public_key , digest_data , digest_str ) : if ( '_invalid' in digest_data ) : raise DigestError ( 'invalid error' ) digest_validator . validate = validate return ( key_provider , digest_provider , digest_validator )
creates a scenario for a stack of actions each action can be "gap" meaning there is no previous link .