def test_toolkit_creation_without_properties_argument_mocked():
    """
    Test that UCFunctionToolkit successfully creates a tool when the function does not have a 'properties' argument using mocks.
    """
    mock_function_info = generate_mock_function_info(has_properties=False)

    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"}'
    )

    class MockPydanticModelWithoutProperties(BaseModel):
        x: str

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

    with (
        mock.patch(
            "unitycatalog.ai.core.utils.function_processing_utils.generate_function_input_params_schema",
            return_value=mock_fn_schema,
        ),
        mock.patch(
            "unitycatalog.ai.llama_index.toolkit.validate_or_set_default_client",
            return_value=mock_client,
        ),
    ):
        toolkit = UCFunctionToolkit(
            function_names=["catalog.schema.test_function"], client=mock_client
        )
        tools = toolkit.tools
        assert len(tools) == 1
        tool = tools[0]
        assert tool.metadata.name == "catalog__schema__test_function"
        assert not tool.metadata.return_direct
        assert tool.metadata.description == "A test function without properties argument"
        assert tool.client_config == {"mock": "config"}

        input_args = {"x": "some_string"}
        result = json.loads(tool.fn(**input_args))["value"]
        assert result == "some_string"

    Test that UCFunctionToolkit successfully creates a tool when the function does not have a 'properties' argument using mocks.
    
ai/integrations/llama_index/tests/test_llama_index_toolkit.py