async def test_connect_to_qdrant_with_settings(self):
        """Test connecting to Qdrant with settings."""
        with (
            patch("airweave.platform.destinations.qdrant.AsyncQdrantClient") as mock_client_class,
            patch("airweave.platform.destinations.qdrant.settings") as mock_settings,
        ):
            # Configure mocks with an actual string value instead of a MagicMock
            mock_settings.qdrant_url = "http://test-qdrant-settings.com:6333"
            mock_client = AsyncMock()
            collections_response = MagicMock()
            collections_response.collections = []
            mock_client.get_collections.return_value = collections_response
            mock_client_class.return_value = mock_client

            # Create and connect
            destination = QdrantDestination()
            await destination.connect_to_qdrant()

            # Verify client initialization with the correct location parameter and port=None
            mock_client_class.assert_called_once_with(
                location="http://test-qdrant-settings.com:6333", prefer_grpc=False, port=None
            )
            mock_client.get_collections.assert_called_once()
Test connecting to Qdrant with settings.
backend/tests/unit/platform/test_qdrant_destination.py