async def test_complex_memory_block_text_mode(memory_with_blocks):
    """Test complex memory block in text mode."""
    # Set complex block to text mode
    for block in memory_with_blocks.memory_blocks:
        if isinstance(block, ComplexMemoryBlock):
            block.mode = "text"
            break

    # Get the memory block content
    content = await memory_with_blocks._get_memory_blocks_content([])

    # Verify complex block content in text mode
    assert "complex_block" in content
    assert content["complex_block"] == "Text content from ComplexMemoryBlock"
Test complex memory block in text mode.
llama-index-core/tests/memory/test_memory_blocks_base.py