test(gateway): queued-ledger source stub carries parent_chat_id

_pinned_channel_inputs reads source.parent_chat_id on the queued-followup path.
The real SessionSource always has the field; the SimpleNamespace stub in
test_queued_final_ledger did not, so two chained-followup tests raised
AttributeError on CI. Give the stub the field instead of re-adding a getattr
guard for a case production cannot hit.
This commit is contained in:
teknium1
2026-09-26 11:07:36 -07:00
committed by kshitij
parent 8712a978d8
commit 724ada32d2

View File

@@ -60,8 +60,10 @@ def _rows():
def _source(*, chat_id=CHAT, thread_id=None, chat_type="dm"):
# parent_chat_id is a real SessionSource field; the queued-followup path reads it to pin the
# channel inputs, so the stub carries it like every real source does.
return SimpleNamespace(platform=Platform.TELEGRAM, chat_id=chat_id, thread_id=thread_id,
chat_type=chat_type)
chat_type=chat_type, parent_chat_id=None)
def _telegram_adapter(send_result=None):