mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 00:46:31 +03:00
Fix test_markseen_message_and_mdn
This commit is contained in:
@@ -56,8 +56,9 @@ def test_moved_markseen(acfactory, direct_imap, log):
|
|||||||
def test_markseen_message_and_mdn(acfactory, direct_imap):
|
def test_markseen_message_and_mdn(acfactory, direct_imap):
|
||||||
ac1, ac2 = acfactory.get_online_accounts(2)
|
ac1, ac2 = acfactory.get_online_accounts(2)
|
||||||
|
|
||||||
# Do not send BCC to self, we only want to test MDN on ac1.
|
# Make sure that messages are not immediately auto-deleted:
|
||||||
ac1.set_config("bcc_self", "0")
|
ac1.set_config("bcc_self", "1")
|
||||||
|
ac2.set_config("bcc_self", "1")
|
||||||
|
|
||||||
acfactory.get_accepted_chat(ac1, ac2).send_text("hi")
|
acfactory.get_accepted_chat(ac1, ac2).send_text("hi")
|
||||||
msg = ac2.wait_for_incoming_msg()
|
msg = ac2.wait_for_incoming_msg()
|
||||||
@@ -77,10 +78,9 @@ def test_markseen_message_and_mdn(acfactory, direct_imap):
|
|||||||
ac1_direct_imap.select_folder("INBOX")
|
ac1_direct_imap.select_folder("INBOX")
|
||||||
ac2_direct_imap.select_folder("INBOX")
|
ac2_direct_imap.select_folder("INBOX")
|
||||||
|
|
||||||
# Check that the mdn is marked as seen
|
# Check that the mdn and original message is marked as seen
|
||||||
assert len(list(ac1_direct_imap.conn.fetch(AND(seen=True), mark_seen=False))) == 1
|
assert len(list(ac1_direct_imap.conn.fetch(AND(seen=True), mark_seen=False))) == 2
|
||||||
# Check original message is marked as seen
|
assert len(list(ac2_direct_imap.conn.fetch(AND(seen=True), mark_seen=False))) == 2
|
||||||
assert len(list(ac2_direct_imap.conn.fetch(AND(seen=True), mark_seen=False))) == 1
|
|
||||||
|
|
||||||
|
|
||||||
def test_trash_multiple_messages(acfactory, direct_imap, log):
|
def test_trash_multiple_messages(acfactory, direct_imap, log):
|
||||||
|
|||||||
Reference in New Issue
Block a user