refine test / chat API

This commit is contained in:
holger krekel
2020-06-08 14:16:40 +02:00
parent b6cc44a956
commit d8bbe2fcce
6 changed files with 34 additions and 47 deletions

View File

@@ -127,6 +127,12 @@ class FFIEventTracker:
if ev.data2 > 0:
return self.account.get_message_by_id(ev.data2)
def wait_msg_delivered(self, msg):
ev = self.get_matching("DC_EVENT_MSG_DELIVERED")
assert ev.data1 == msg.chat.id
assert ev.data2 == msg.id
assert msg.is_out_delivered()
class EventThread(threading.Thread):
""" Event Thread for an account.