diff --git a/test/test_protocol.py b/test/test_protocol.py index deaaf50..38c28ea 100644 --- a/test/test_protocol.py +++ b/test/test_protocol.py @@ -528,9 +528,7 @@ class TestEiProtocol: except (ConnectionResetError, BrokenPipeError): pass - ei.wait_for( - lambda: bool([c for c in connection.calllog if c.name == "Disconnected"]) - ) + ei.wait_for(lambda: any(c.name == "Disconnect" for c in connection.calllog)) for call in connection.calllog: assert call.name != "Disconnected", "No disconnect event allowed here"