@@ -269,7 +269,7 @@ def test_enable_mvbox_move(acfactory, lp):
269
269
assert ac2 ._evtracker .wait_next_incoming_message ().text == "message1"
270
270
271
271
272
- def test_mvbox_thread_and_sentbox (acfactory , lp ):
272
+ def test_mvbox_thread_and_trash (acfactory , lp ):
273
273
lp .sec ("ac1: start with mvbox thread" )
274
274
ac1 = acfactory .new_online_configuring_account (mvbox_move = True )
275
275
@@ -279,8 +279,8 @@ def test_mvbox_thread_and_sentbox(acfactory, lp):
279
279
lp .sec ("ac2 and ac1: waiting for configuration" )
280
280
acfactory .bring_accounts_online ()
281
281
282
- lp .sec ("ac1: create sentbox " )
283
- ac1 .direct_imap .create_folder ("Sent " )
282
+ lp .sec ("ac1: create trash " )
283
+ ac1 .direct_imap .create_folder ("Trash " )
284
284
ac1 .set_config ("scan_all_folders_debounce_secs" , "0" )
285
285
ac1 .stop_io ()
286
286
ac1 .start_io ()
@@ -290,7 +290,7 @@ def test_mvbox_thread_and_sentbox(acfactory, lp):
290
290
assert ac2 ._evtracker .wait_next_incoming_message ().text == "message1"
291
291
292
292
assert ac1 .get_config ("configured_mvbox_folder" ) == "DeltaChat"
293
- while ac1 .get_config ("configured_sentbox_folder " ) != "Sent " :
293
+ while ac1 .get_config ("configured_trash_folder " ) != "Trash " :
294
294
ac1 ._evtracker .get_matching ("DC_EVENT_CONNECTIVITY_CHANGED" )
295
295
296
296
@@ -834,9 +834,9 @@ def test_no_draft_if_cant_send(acfactory):
834
834
835
835
def test_dont_show_emails (acfactory , lp ):
836
836
"""Most mailboxes have a "Drafts" folder where constantly new emails appear but we don't actually want to show them.
837
- So: If it's outgoing AND there is no Received header AND it's not in the sentbox , then ignore the email.
837
+ So: If it's outgoing AND there is no Received header, then ignore the email.
838
838
839
- If the draft email is sent out later (i.e. moved to "Sent "), it must be shown.
839
+ If the draft email is sent out and received later (i.e. it's in "Inbox "), it must be shown.
840
840
841
841
Also, test that unknown emails in the Spam folder are not shown."""
842
842
ac1 = acfactory .new_online_configuring_account ()
@@ -845,7 +845,6 @@ def test_dont_show_emails(acfactory, lp):
845
845
846
846
acfactory .wait_configured (ac1 )
847
847
ac1 .direct_imap .create_folder ("Drafts" )
848
- ac1 .direct_imap .create_folder ("Sent" )
849
848
ac1 .direct_imap .create_folder ("Spam" )
850
849
ac1 .direct_imap .create_folder ("Junk" )
851
850
@@ -861,21 +860,7 @@ def test_dont_show_emails(acfactory, lp):
861
860
862
861
Content-Type: text/plain; charset=utf-8
863
862
864
- message in Drafts that is moved to Sent later
865
- """ .format (
866
- ac1 .get_config ("configured_addr" ),
867
- ),
868
- )
869
- ac1 .direct_imap .append (
870
- "Sent" ,
871
- """
872
- From: ac1 <{}>
873
- Subject: subj
874
-
875
-
876
- Content-Type: text/plain; charset=utf-8
877
-
878
- message in Sent
863
+ message in Drafts received later
879
864
""" .format (
880
865
ac1 .get_config ("configured_addr" ),
881
866
),
@@ -955,31 +940,31 @@ def test_dont_show_emails(acfactory, lp):
955
940
lp .sec ("All prepared, now let DC find the message" )
956
941
ac1 .start_io ()
957
942
958
- msg = ac1 ._evtracker .wait_next_messages_changed ()
959
-
960
943
# Wait until each folder was scanned, this is necessary for this test to test what it should test:
961
944
ac1 ._evtracker .wait_idle_inbox_ready ()
962
945
963
- assert msg .text == "subj – message in Sent"
946
+ fresh_msgs = list (ac1 .get_fresh_messages ())
947
+ assert len (fresh_msgs ) == 1
948
+ msg = fresh_msgs [0 ]
964
949
chat_msgs = msg .chat .get_messages ()
965
- assert len (chat_msgs ) == 2
950
+ assert len (chat_msgs ) == 1
966
951
assert any (msg .text == "subj – Actually interesting message in Spam" for msg in chat_msgs )
967
952
968
953
assert not any ("unknown.address" in c .get_name () for c in ac1 .get_chats ())
969
954
ac1 .direct_imap .select_folder ("Spam" )
970
955
assert ac1 .
direct_imap .
get_uid_by_message_id (
"[email protected] " )
971
956
972
957
ac1 .stop_io ()
973
- lp .sec ("'Send out' the draft, i.e. move it to the Sent folder , and wait for DC to display it this time" )
958
+ lp .sec ("'Send out' the draft by moving it to Inbox , and wait for DC to display it this time" )
974
959
ac1 .direct_imap .select_folder ("Drafts" )
975
960
uid = ac1 .
direct_imap .
get_uid_by_message_id (
"[email protected] " )
976
- ac1 .direct_imap .conn .move (uid , "Sent " )
961
+ ac1 .direct_imap .conn .move (uid , "Inbox " )
977
962
978
963
ac1 .start_io ()
979
964
msg2 = ac1 ._evtracker .wait_next_messages_changed ()
980
965
981
- assert msg2 .text == "subj – message in Drafts that is moved to Sent later"
982
- assert len (msg .chat .get_messages ()) == 3
966
+ assert msg2 .text == "subj – message in Drafts received later"
967
+ assert len (msg .chat .get_messages ()) == 2
983
968
984
969
985
970
def test_bot (acfactory , lp ):
0 commit comments