

def test_close_mailbox_after_changing_flags(self):
    account = _account_for_test()
    with mock_worker(fol1={
        13: msg13_data,
    }) as worker:
        account.perform_update()
        worker.close_mailbox.reset_mock()
        account.get_folder('fol1').change_flag([13], 'add', '\\Flagged')
        worker.close_mailbox.assert_called_once_with()

dataset/ETHPy150Open mgax/tinymail/src/tinymail/tests/test_account.py ModifyFlagsTest.test_close_mailbox_after_changing_flags/original