async def test_embed_success(self, mock_post, model):
        """Test successful embedding of a single text."""
        # Mock response
        mock_response = MagicMock()
        mock_response.raise_for_status = AsyncMock()
        mock_response.json.return_value = {"vector": [0.1, 0.2, 0.3] * 128}
        mock_post.return_value = mock_response

        result = await model.embed("Test text")

        # Verify the result
        assert isinstance(result, list)
        assert len(result) == 384  # Default dimensions for this model

        # Verify the API call
        mock_post.assert_called_once_with(
            f"{model.inference_url}/vectors", json={"text": "Test text"}
        )
Test successful embedding of a single text.
backend/tests/platform/embedding_models/test_local_text2vec.py