Fix test_markseen_message_and_mdn

This commit is contained in:
Hocuri
2026-05-06 14:39:29 +02:00
parent 6966dc32a0
commit 3b5df6071e

View File

@@ -56,8 +56,9 @@ def test_moved_markseen(acfactory, direct_imap, log):
def test_markseen_message_and_mdn(acfactory, direct_imap):
ac1, ac2 = acfactory.get_online_accounts(2)
# Do not send BCC to self, we only want to test MDN on ac1.
ac1.set_config("bcc_self", "0")
# Make sure that messages are not immediately auto-deleted:
ac1.set_config("bcc_self", "1")
ac2.set_config("bcc_self", "1")
acfactory.get_accepted_chat(ac1, ac2).send_text("hi")
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")
ac2_direct_imap.select_folder("INBOX")
# Check that the mdn is marked as seen
assert len(list(ac1_direct_imap.conn.fetch(AND(seen=True), mark_seen=False))) == 1
# Check original message is marked as seen
assert len(list(ac2_direct_imap.conn.fetch(AND(seen=True), mark_seen=False))) == 1
# 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))) == 2
assert len(list(ac2_direct_imap.conn.fetch(AND(seen=True), mark_seen=False))) == 2
def test_trash_multiple_messages(acfactory, direct_imap, log):