def _TestUpdatePhoto(tester, user_cookie, request_dict):
 validator = tester.validator
 (user_id, device_id) = tester.GetIdsFromCookie(user_cookie)
 request_dict = deepcopy(request_dict)
 actual_dict = tester.SendRequest('update_photo', user_cookie, request_dict)
 photo_dict = deepcopy(request_dict)
 photo_dict['user_id'] = user_id
 photo_dict.pop('headers', None)
 photo_dict.pop('activity', None)
 photo_dict.pop('asset_keys', None)
 validator.ValidateUpdateDBObject(Photo, **photo_dict)
 if request_dict.get('asset_keys'):
  up_dict = {'user_id': user_id, 'photo_id': request_dict['photo_id'], 'asset_keys': request_dict['asset_keys']}
  validator.ValidateUpdateDBObject(UserPhoto, **up_dict)
 tester._CompareResponseDicts('update_photo', user_id, request_dict, {}, actual_dict)
 return actual_dict

def _TestUpdatePhoto ( tester , user_cookie , request_dict ) : validator = tester . validator ( user_id , device_id ) = tester . GetIdsFromCookie ( user_cookie ) request_dict = deepcopy ( request_dict ) actual_dict = tester . SendRequest ( 'update_photo' , user_cookie , request_dict ) photo_dict = deepcopy ( request_dict ) photo_dict [ 'user_id' ] = user_id photo_dict . pop ( 'headers' , None ) photo_dict . pop ( 'activity' , None ) photo_dict . pop ( 'asset_keys' , None ) validator . ValidateUpdateDBObject ( Photo , ** photo_dict ) if request_dict . get ( 'asset_keys' ) : up_dict = { 'user_id' : user_id , 'photo_id' : request_dict [ 'photo_id' ] , 'asset_keys' : request_dict [ 'asset_keys' ] } validator . ValidateUpdateDBObject ( UserPhoto , ** up_dict ) tester . _CompareResponseDicts ( 'update_photo' , user_id , request_dict , { } , actual_dict ) return actual_dict
called by the servicetester in order to test update_photo service api call .