From b7819093d77252aa7060bee90c0be0f108ceb3ea Mon Sep 17 00:00:00 2001 From: Pruthviraj Date: Mon, 2 Nov 2026 16:00:06 +0530 Subject: [PATCH] test(channels): wait for the sendVoice reply in the voice note test --- tests/channels/test_telegram.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/channels/test_telegram.py b/tests/channels/test_telegram.py index 62aa0fa58..a9c64c35f 100644 --- a/tests/channels/test_telegram.py +++ b/tests/channels/test_telegram.py @@ -381,6 +381,7 @@ async def spy(method, **kwargs): assert "[Current time:" in content assert content.endswith("what's the weather in Pune") assert tg.api.screen()[-1] == "It's sunny." + await until(lambda: any(method == "sendVoice" for method, _ in sent)) voices = [kwargs for method, kwargs in sent if method == "sendVoice"] assert len(voices) == 1 name, data, mime = voices[0]["files"]["voice"]