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