mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
test: get_protected_chat(): Use FFIEventTracker instead of dc_wait_next_msgs() (#5207)
The way it was implemented it threw out all remaining messages after finding the next incoming message. Better use FFIEventTracker functions, they are used in all the tests anyway.
This commit is contained in:
@@ -182,6 +182,12 @@ class FFIEventTracker:
|
||||
print(f"** SECUREJOINT-INVITER PROGRESS {target}", self.account)
|
||||
break
|
||||
|
||||
def wait_securejoin_joiner_progress(self, target):
|
||||
while True:
|
||||
event = self.get_matching("DC_EVENT_SECUREJOIN_JOINER_PROGRESS")
|
||||
if event.data2 >= target:
|
||||
break
|
||||
|
||||
def wait_idle_inbox_ready(self):
|
||||
"""Has to be called after start_io() to wait for fetch_existing_msgs to run
|
||||
so that new messages are not mistaken for old ones:
|
||||
|
||||
Reference in New Issue
Block a user