def test_deleting_from_a_message_with_multiple_uids(db, default_account, message, thread):
 inbox_folder = Folder.find_or_create(db.session, default_account, 'inbox', 'inbox')
 sent_folder = Folder.find_or_create(db.session, default_account, 'sent', 'sent')
 add_fake_imapuid(db.session, default_account.id, message, sent_folder, 1337)
 add_fake_imapuid(db.session, default_account.id, message, inbox_folder, 2222)
 assert (len(message.imapuids) == 2)
 remove_deleted_uids(default_account.id, inbox_folder.id, [2222])
 db.session.expire_all()
 assert (message.deleted_at is None), 'The associated message should not have been marked for deletion.'
 assert (len(message.imapuids) == 1), 'The message should have only one imapuid.'

def test_deleting_from_a_message_with_multiple_uids ( db , default_account , message , thread ) : inbox_folder = Folder . find_or_create ( db . session , default_account , 'inbox' , 'inbox' ) sent_folder = Folder . find_or_create ( db . session , default_account , 'sent' , 'sent' ) add_fake_imapuid ( db . session , default_account . id , message , sent_folder , 1337 ) add_fake_imapuid ( db . session , default_account . id , message , inbox_folder , 2222 ) assert ( len ( message . imapuids ) == 2 ) remove_deleted_uids ( default_account . id , inbox_folder . id , [ 2222 ] ) db . session . expire_all ( ) assert ( message . deleted_at is None ) , 'The associated message should not have been marked for deletion.' assert ( len ( message . imapuids ) == 1 ) , 'The message should have only one imapuid.'
check that deleting a imapuid from a message with multiple uids doesnt mark the message for deletion .