def test_uc_function_to_llama_tool_mocked():
    """
    Test the conversion of a Unity Catalog function to a Llama tool without 'properties' argument using mocks.
    """
    mock_function_info = generate_mock_function_info(has_properties=False)

    class MockPydanticModelWithoutProperties(BaseModel):
        x: str

    mock_fn_schema = mock.Mock()
    mock_fn_schema.pydantic_model = MockPydanticModelWithoutProperties

    mock_client = mock.create_autospec(BaseFunctionClient, instance=True)
    mock_client.get_function.return_value = mock_function_info
    mock_client.to_dict.return_value = {"mock": "config"}
    mock_client.execute_function.return_value = MockFunctionExecutionResult(
        return_value='{"value": "some_string"}'
    )

    with (
        mock.patch(
            "unitycatalog.ai.llama_index.toolkit.validate_or_set_default_client",
            return_value=mock_client,
        ) as mock_validate_client,
    ):
        tool = UCFunctionToolkit.uc_function_to_llama_tool(
            function_name="catalog.schema.test_function", client=mock_client, return_direct=True
        )
        assert tool.metadata.return_direct

        input_args = {"x": "some_string"}
        result = json.loads(tool.fn(**input_args))["value"]
        assert result == "some_string"
        mock_validate_client.assert_called_once()
        mock_client.get_function.assert_called_once_with("catalog.schema.test_function")
        mock_client.to_dict.assert_called_once()
        mock_client.execute_function.assert_called_once_with(
            function_name="catalog.schema.test_function",
            parameters=input_args,
            enable_retriever_tracing=False,
        )

    Test the conversion of a Unity Catalog function to a Llama tool without 'properties' argument using mocks.
    
ai/integrations/llama_index/tests/test_llama_index_toolkit.py