def _TestListIdentities(tester, user_cookie, request_dict):
  validator = tester.validator
  user_id, device_id = tester.GetIdsFromCookie(user_cookie)
  request_dict = deepcopy(request_dict)

  # Send list_identities request.
  actual_dict = tester.SendRequest('list_identities', user_cookie, request_dict)

  expected_dict = {'user_identities': []}
  predicate = lambda ident: ident.user_id == user_id
  for expected_ident in validator.QueryModelObjects(Identity, predicate=predicate):
    ident_dict = {'identity': expected_ident.key}
    if expected_ident.authority is not None:
      ident_dict['authority'] = expected_ident.authority

    expected_dict['user_identities'].append(ident_dict)

  tester._CompareResponseDicts('list_identities', user_id, request_dict, expected_dict, actual_dict)
  return actual_dict
The vault customer associated with this transaction
dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/list_identities_test.py/_TestListIdentities--crossover with--dataset/ETHPy150Open braintree/braintree_python/braintree/transaction.py/Transaction.vault_customer