def test_sync(self):
        mailbox = mail.maildir.StringListMailbox(["foo"])
        mailbox.deleteMessage(0)
        mailbox.sync()
        mailbox.undeleteMessages()
        self.assertEqual(mailbox.listMessages(0), 0)
        self.assertEqual(mailbox.listMessages(), [0])
Mock the MQTT component.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/mail/test/test_mail.py/StringListMailboxTests.test_sync--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/tests/common.py/mock_mqtt_component