

def test_load_full_message(self):
    from tinymail.account import message_updated
    account = _account_for_test()
    mime_message = 'Subject: hi\r\n\r\nHello world!'
    with mock_worker(fol1={
        6: None,
    }) as worker:
        account.perform_update()
        message = account.get_folder('fol1')._messages[6]
        worker.get_message_body.return_value = defer(mime_message)
        worker.close_mailbox.reset_mock()
        with listen_for(message_updated) as caught_signals:
            message.load_full()
    self.assertEqual(message.raw_full, mime_message)
    self.assertEqual(caught_signals, [(message, {
        
    })])
    worker.close_mailbox.assert_called_once_with()

dataset/ETHPy150Open mgax/tinymail/src/tinymail/tests/test_account.py AccountUpdateTest.test_load_full_message/original