def _cbTestAppend(self, ignored, mbox):
        self.assertEquals(len(mbox.listMessages()), 10)
        self.assertEquals(
            [len(mbox.getMessage(i).read()) for i in range(10)],
            range(1, 11))
        # test in the right order: last to first error location.
        self._setState(None, mbox, rename=False)
        d = self._append(None, mbox)
        d.addCallback(self._setState, mbox, rename=True, write=False)
        d.addCallback(self._append, mbox)
        d.addCallback(self._setState, mbox, write=True, open=False)
        d.addCallback(self._append, mbox)
        d.addCallback(self._setState, mbox, open=True)
        return d
Check that the mailbox has the expected number (ten) of messages in it,
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/mail/test/test_mail.py/MaildirAppendStringTestCase._cbTestAppend