async def test_embed_many_success(self, model):
        """Test successful embedding of multiple texts."""
        mock_embeddings = [
            [0.1, 0.2, 0.3] * 512,
            [0.4, 0.5, 0.6] * 512
        ]
        mock_response = CreateEmbeddingResponse(
            object="list",
            data=[
                Embedding(
                    object="embedding",
                    embedding=mock_embeddings[0],
                    index=0
                ),
                Embedding(
                    object="embedding",
                    embedding=mock_embeddings[1],
                    index=1
                )
            ],
            model="text-embedding-3-small",
            usage={"prompt_tokens": 10, "total_tokens": 10}
        )

        with patch.object(model._client.embeddings, 'create', new_callable=AsyncMock) as mock_create:
            mock_create.return_value = mock_response

            texts = ["Text 1", "Text 2"]
            result = await model.embed_many(texts)

            # Verify the result
            assert isinstance(result, list)
            assert len(result) == 2
            assert all(len(vec) == 1536 for vec in result)
            assert result == mock_embeddings

            # Verify the API call
            mock_create.assert_called_once_with(
                input=texts,
                model="text-embedding-3-small",
                encoding_format="float",
            )
Test successful embedding of multiple texts.
backend/tests/platform/embedding_models/test_openai_text2vec.py