@@ -487,54 +487,3 @@ def test_scan_folders(acfactory, log, direct_imap, folder, move, expected_destin
487487 if folder != expected_destination :
488488 ac1_direct_imap .select_folder (folder )
489489 assert len (ac1_direct_imap .get_all_messages ()) == 0
490-
491-
492- def test_trash_multiple_messages (acfactory , lp ):
493- ac1 , ac2 = acfactory .get_online_accounts (2 )
494- ac2 .stop_io ()
495-
496- # Create the Trash folder on IMAP server and configure deletion to it. There was a bug that if
497- # Trash wasn't configured initially, it can't be configured later, let's check this.
498- lp .sec ("Creating trash folder" )
499- ac2 .direct_imap .create_folder ("Trash" )
500- ac2 .set_config ("delete_to_trash" , "1" )
501-
502- lp .sec ("Check that Trash can be configured initially as well" )
503- ac3 = acfactory .new_online_configuring_account (cloned_from = ac2 )
504- acfactory .bring_accounts_online ()
505- assert ac3 .get_config ("configured_trash_folder" )
506- ac3 .stop_io ()
507-
508- ac2 .start_io ()
509- chat12 = acfactory .get_accepted_chat (ac1 , ac2 )
510-
511- lp .sec ("ac1: sending 3 messages" )
512- texts = ["first" , "second" , "third" ]
513- for text in texts :
514- chat12 .send_text (text )
515-
516- lp .sec ("ac2: waiting for all messages on the other side" )
517- to_delete = []
518- for text in texts :
519- msg = ac2 ._evtracker .wait_next_incoming_message ()
520- assert msg .text in texts
521- if text != "second" :
522- to_delete .append (msg )
523- # ac2 has received some messages, this is impossible w/o the trash folder configured, let's
524- # check the configuration.
525- assert ac2 .get_config ("configured_trash_folder" ) == "Trash"
526-
527- lp .sec ("ac2: deleting all messages except second" )
528- assert len (to_delete ) == len (texts ) - 1
529- ac2 .delete_messages (to_delete )
530-
531- lp .sec ("ac2: test that only one message is left" )
532- while 1 :
533- ac2 ._evtracker .get_matching ("DC_EVENT_IMAP_MESSAGE_MOVED" )
534- ac2 .direct_imap .select_config_folder ("inbox" )
535- nr_msgs = len (ac2 .direct_imap .get_all_messages ())
536- assert nr_msgs > 0
537- if nr_msgs == 1 :
538- break
539-
540-
0 commit comments