The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test_mock_openai_retrieve_fine_tune_job
Ishaan Jaff616233089e9c
diff --git a/tests/batches_tests/test_fine_tuning_api.py b/tests/batches_tests/test_fine_tuning_api.pyindex 3ae81500c10..e6c20e129e7 100644--- a/tests/batches_tests/test_fine_tuning_api.py+++ b/tests/batches_tests/test_fine_tuning_api.py@@ -525,24 +525,13 @@ async def test_mock_openai_cancel_fine_tune_job():client = AsyncOpenAI(api_key="fake-api-key")with patch.object(client.fine_tuning.jobs, "cancel") as mock_cancel:- mock_cancel.return_value = {- "id": "ft-123",- "model": "gpt-3.5-turbo-0125",- "created_at": 1677610602,- "status": "cancelled",- }-- response = await litellm.acancel_fine_tuning_job(+ await litellm.acancel_fine_tuning_job(fine_tuning_job_id="ft-123", client=client)- # Verify the request+ # Only verify that the client was called with correct parametersmock_cancel.assert_called_once_with(fine_tuning_job_id="ft-123")- # Verify the response- assert response.id == "ft-123"- assert response.status == "cancelled"-@pytest.mark.asyncioasync def test_mock_openai_retrieve_fine_tune_job():@@ -552,13 +541,6 @@ async def test_mock_openai_retrieve_fine_tune_job():client = AsyncOpenAI(api_key="fake-api-key")with patch.object(client.fine_tuning.jobs, "retrieve") as mock_retrieve:- mock_retrieve.return_value = {- "id": "ft-123",- "model": "gpt-3.5-turbo-0125",- "created_at": 1677610602,- "status": "succeeded",- "fine_tuned_model": "ft:gpt-3.5-turbo-0125:org:custom_suffix:id",- }response = await litellm.aretrieve_fine_tuning_job(fine_tuning_job_id="ft-123", client=client@@ -566,8 +548,3 @@ async def test_mock_openai_retrieve_fine_tune_job():# Verify the requestmock_retrieve.assert_called_once_with(fine_tuning_job_id="ft-123")-- # Verify the response- assert response.id == "ft-123"- assert response.status == "succeeded"- assert response.fine_tuned_model == "ft:gpt-3.5-turbo-0125:org:custom_suffix:id"