async def test_aput_with_mocked_response(mock_extraction_llm, sample_messages):
    """Test aput method with a mocked LLM response."""
    memory_block = FactExtractionMemoryBlock(llm=mock_extraction_llm)

    await memory_block.aput(sample_messages)

    # Verify the extracted facts
    assert len(memory_block.facts) == 2
    assert "John lives in New York" in memory_block.facts
    assert "John is a software engineer" in memory_block.facts
Test aput method with a mocked LLM response.
llama-index-core/tests/memory/blocks/test_fact.py