diff --git a/tests/channels/test_telegram.py b/tests/channels/test_telegram.py index 62aa0fa5..a9c64c35 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"]