async def test_uc_function_to_litellm_tool(uc_client):
    """Test conversion of a UC function to a LiteLLM tool."""
    mock_function_info = generate_function_info()
    with (
        mock.patch(
            "unitycatalog.ai.core.client.UnitycatalogFunctionClient.get_function",
            return_value=mock_function_info,
        ),
        mock.patch(
            "unitycatalog.ai.core.client.UnitycatalogFunctionClient.execute_function",
            return_value=FunctionExecutionResult(format="SCALAR", value="some_string"),
        ),
    ):
        tool = UCFunctionToolkit.uc_function_to_litellm_tool(
            function_name="catalog.schema.test", client=uc_client
        )
        assert tool["name"] == "catalog__schema__test"
Test conversion of a UC function to a LiteLLM tool.
ai/integrations/litellm/tests/test_litellm_toolkit_oss.py