mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
Add Python test
This commit is contained in:
@@ -187,7 +187,9 @@ class DirectImap:
|
|||||||
""" (blocking) wait for next idle message from server. """
|
""" (blocking) wait for next idle message from server. """
|
||||||
assert self._idling
|
assert self._idling
|
||||||
self.account.log("imap-direct: calling idle_check")
|
self.account.log("imap-direct: calling idle_check")
|
||||||
res = self.conn.idle_check()
|
res = self.conn.idle_check(timeout=30)
|
||||||
|
if len(res) == 0:
|
||||||
|
raise TimeoutError
|
||||||
if terminate:
|
if terminate:
|
||||||
self.idle_done()
|
self.idle_done()
|
||||||
return res
|
return res
|
||||||
|
|||||||
@@ -850,6 +850,7 @@ class TestOnlineAccount:
|
|||||||
|
|
||||||
lp.sec("mark messages as seen on ac2, wait for changes on ac1")
|
lp.sec("mark messages as seen on ac2, wait for changes on ac1")
|
||||||
ac2.direct_imap.idle_start()
|
ac2.direct_imap.idle_start()
|
||||||
|
ac1.direct_imap.idle_start()
|
||||||
ac2.mark_seen_messages([msg2, msg4])
|
ac2.mark_seen_messages([msg2, msg4])
|
||||||
ac2.direct_imap.idle_check(terminate=True)
|
ac2.direct_imap.idle_check(terminate=True)
|
||||||
lp.step("1")
|
lp.step("1")
|
||||||
@@ -858,6 +859,8 @@ class TestOnlineAccount:
|
|||||||
assert ev.data1 > const.DC_CHAT_ID_LAST_SPECIAL
|
assert ev.data1 > const.DC_CHAT_ID_LAST_SPECIAL
|
||||||
assert ev.data2 > const.DC_MSG_ID_LAST_SPECIAL
|
assert ev.data2 > const.DC_MSG_ID_LAST_SPECIAL
|
||||||
lp.step("2")
|
lp.step("2")
|
||||||
|
ac1.direct_imap.idle_wait_for_seen() # Check that ac1 marks the read receipt as read
|
||||||
|
|
||||||
assert msg1.is_out_mdn_received()
|
assert msg1.is_out_mdn_received()
|
||||||
assert msg3.is_out_mdn_received()
|
assert msg3.is_out_mdn_received()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user