def test_no_ttl_when_disabled(chat_store):
    """Test that TTL is not set when ttl_seconds is None."""
    messages = [ChatMessage(content="No TTL")]
    chat_store.set_messages("NoTTLSession", messages)

    # Get the raw item from DynamoDB to check TTL
    response = chat_store._table.get_item(Key={"SessionId": "NoTTLSession"})
    item = response["Item"]

    # Verify TTL attribute does not exist
    assert "TTL" not in item
Test that TTL is not set when ttl_seconds is None.
llama-index-integrations/storage/chat_store/llama-index-storage-chat-store-dynamodb/tests/test_chat_store_dynamodb_chat_store.py