diff --git a/tests/test_litellm/proxy/rag_endpoints/test_s3_vectors_ingestion.py b/tests/test_litellm/proxy/rag_endpoints/test_s3_vectors_ingestion.py index 85750531b45..cc88c673eb8 100644 --- a/tests/test_litellm/proxy/rag_endpoints/test_s3_vectors_ingestion.py +++ b/tests/test_litellm/proxy/rag_endpoints/test_s3_vectors_ingestion.py @@ -1,5 +1,5 @@ from types import SimpleNamespace -from unittest.mock import AsyncMock, call, patch +from unittest.mock import AsyncMock, patch import pytest @@ -36,15 +36,22 @@ async def test_s3_vectors_ingestion_uses_vector_store_embedding_model(): ) embeddings = await ingestion.embed(["hello"]) + + mock_aembedding.assert_awaited_once_with( + model="text-embedding-3-large", input=["hello"] + ) + assert embeddings == [[0.1, 0.2, 0.3]] + + mock_aembedding.reset_mock() + mock_aembedding.return_value = SimpleNamespace( + data=[{"embedding": [0.1, 0.2, 0.3]}] + ) + dimension = await ingestion._get_dimension_from_embedding_request() - mock_aembedding.assert_has_awaits( - [ - call(model="text-embedding-3-large", input=["hello"]), - call(model="text-embedding-3-large", input=["test"]), - ] + mock_aembedding.assert_awaited_once_with( + model="text-embedding-3-large", input=["test"] ) - assert embeddings == [[0.1, 0.2, 0.3]] assert dimension == 3