(self)
| 651 | self.assertEqual(msg_returned.get_payload(), '3\n') |
| 652 | |
| 653 | def test_consistent_factory(self): |
| 654 | # Add a message. |
| 655 | msg = mailbox.MaildirMessage(self._template % 0) |
| 656 | msg.set_subdir('cur') |
| 657 | msg.set_flags('RF') |
| 658 | key = self._box.add(msg) |
| 659 | |
| 660 | # Create new mailbox with |
| 661 | class FakeMessage(mailbox.MaildirMessage): |
| 662 | pass |
| 663 | box = mailbox.Maildir(self._path, factory=FakeMessage) |
| 664 | box.colon = self._box.colon |
| 665 | msg2 = box.get_message(key) |
| 666 | self.assertIsInstance(msg2, FakeMessage) |
| 667 | |
| 668 | def test_initialize_new(self): |
| 669 | # Initialize a non-existent mailbox |
nothing calls this directly
no test coverage detected