def test_append(self):
        """
        L{MaildirMailbox.appendMessage} returns a L{Deferred} which fires when
        the message has been added to the end of the mailbox.
        """
        mbox = mail.maildir.MaildirMailbox(self.d)
        mbox.AppendFactory = FailingMaildirMailboxAppendMessageTask

        d = self._appendMessages(mbox, ["X" * i for i in range(1, 11)])
        d.addCallback(self.assertEquals, [None] * 10)
        d.addCallback(self._cbTestAppend, mbox)
        return d
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/mail/test/test_mail.py/MaildirAppendStringTestCase.test_append/original