def modify_profile():
    """Permite a un usuario actualizar su perfil"""
    if not request.is_json:
        abort(400)
    data = request.get_json()
    uid = get_jwt_identity()
    UserService.modify_profile(uid, data)
    return jsonify(result='success'), 200
Ejemplo n.º 2
0
def test_modify_profile_if_wrong_schema_raises_validation_error(user_data):
    with pytest.raises(ValidationError):
        UserService.modify_profile(user_data.uid, user_data.invalid_user)