def test_toolkit_creation_with_properties_argument_mocked():
    """
    Test that UCFunctionToolkit raises a ValueError when the function has a 'properties' argument using mocks.
    """
    mock_function_info = generate_mock_function_info(has_properties=True)

    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_fn_schema = mock.Mock()
    mock_fn_schema.pydantic_model = {"properties": {}}

    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,
        ),
    ):
        with pytest.raises(ValueError, match="has a 'properties' key in its input schema"):
            UCFunctionToolkit(function_names=["catalog.schema.test_function"], client=mock_client)

    Test that UCFunctionToolkit raises a ValueError when the function has a 'properties' argument using mocks.
    
ai/integrations/llama_index/tests/test_llama_index_toolkit.py