diff --git a/python/tests/test_1_online.py b/python/tests/test_1_online.py index 412247cbb..1d86e8853 100644 --- a/python/tests/test_1_online.py +++ b/python/tests/test_1_online.py @@ -134,22 +134,27 @@ def test_one_account_send_bcc_setting(acfactory, lp): ac1.set_config("bcc_self", "1") lp.sec("send out message with bcc to ourselves") - with ac1.direct_imap.idle() as idle1: - msg_out = chat.send_text("message2") + msg_out = chat.send_text("message2") - # wait for send out (BCC) - ev = ac1._evtracker.get_matching("DC_EVENT_SMTP_MESSAGE_SENT") - assert ac1.get_config("bcc_self") == "1" + # wait for send out (BCC) + ev = ac1._evtracker.get_matching("DC_EVENT_SMTP_MESSAGE_SENT") + assert ac1.get_config("bcc_self") == "1" - # now make sure we are sending message to ourselves too - assert self_addr in ev.data2 - assert other_addr in ev.data2 - assert idle1.wait_for_seen() - - # Second client receives only second message, but not the first + # Second client receives only second message, but not the first. ev_msg = ac1_clone._evtracker.wait_next_messages_changed() assert ev_msg.text == msg_out.text + # now make sure we are sending message to ourselves too + assert self_addr in ev.data2 + assert other_addr in ev.data2 + + # BCC-self messages are marked as seen by the sender device. + ac1._evtracker.get_info_contains("Marked messages 1 in folder INBOX as seen.") + + # Check that the message is marked as seen on IMAP. + ac1.direct_imap.select_folder("Inbox") + assert len(list(ac1.direct_imap.conn.fetch(AND(seen=True)))) == 1 + def test_send_file_twice_unicode_filename_mangling(tmpdir, acfactory, lp): ac1, ac2 = acfactory.get_online_accounts(2)