def METHOD_NAME(self, request: Request, pk: str) -> Response:
    """Test Property Mapping"""
    mapping: PropertyMapping = self.get_object()
    test_params = PolicyTestSerializer(data=request.data)
    if not test_params.is_valid():
        return Response(test_params.errors, status=400)
    format_result = str(request.GET.get("format_result", "false")).lower() == "true"
    # User permission check, only allow mapping testing for users that are readable
    users = get_objects_for_user(request.user, "authentik_core.view_user").filter(
        pk=test_params.validated_data["user"].pk
    )
    if not users.exists():
        raise PermissionDenied()
    response_data = {"successful": True, "result": ""}
    try:
        result = mapping.evaluate(
            users.first(),
            self.request,
            **test_params.validated_data.get("context", {}),
        )
        response_data["result"] = dumps(
            sanitize_item(result), indent=(4 if format_result else None)
        )
    except Exception as exc:  # pylint: disable=broad-except
        response_data["result"] = str(exc)
        response_data["successful"] = False
    response = PropertyMappingTestResultSerializer(response_data)
    return Response(response.data)