diff options
| author | Barry Warsaw | 2009-02-04 07:00:56 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-02-04 07:00:56 -0500 |
| commit | b93b16bea10a1983bd784d56703518134f538d08 (patch) | |
| tree | 14c0e17243908377f903eb7af73cdfff72ebf53c /src/mailman/testing/helpers.py | |
| parent | bbbe644f21ef956e0b94a2d7ba9dd73e97846e3d (diff) | |
| download | mailman-b93b16bea10a1983bd784d56703518134f538d08.tar.gz mailman-b93b16bea10a1983bd784d56703518134f538d08.tar.zst mailman-b93b16bea10a1983bd784d56703518134f538d08.zip | |
Diffstat (limited to 'src/mailman/testing/helpers.py')
| -rw-r--r-- | src/mailman/testing/helpers.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py index f92c5f012..10f5229d7 100644 --- a/src/mailman/testing/helpers.py +++ b/src/mailman/testing/helpers.py @@ -35,7 +35,6 @@ import errno import signal import socket import logging -import mailbox import smtplib import threading @@ -44,6 +43,7 @@ from Queue import Empty, Queue from mailman.bin.master import Loop as Master from mailman.config import config from mailman.testing.smtplistener import Server +from mailman.utilities.mailbox import Mailbox log = logging.getLogger('mailman.debug') @@ -69,6 +69,12 @@ def make_testable_runner(runner_class, name=None): class EmptyingRunner(runner_class): """Stop processing when the queue is empty.""" + def __init__(self, *args, **kws): + super(EmptyingRunner, self).__init__(*args, **kws) + # We know it's an EmptyingRunner, so really we want to see the + # super class in the log files. + self.__class__.__name__ = runner_class.__name__ + def _do_periodic(self): """Stop when the queue is empty.""" self._stop = (len(self.switchboard.files) == 0) @@ -106,8 +112,8 @@ def digest_mbox(mlist): :param mlist: The mailing list. :return: The mailing list's pending digest as a mailbox. """ - path = os.path.join(mlist.data_path, 'digest.mbox') - return mailbox.mbox(path) + path = os.path.join(mlist.data_path, 'digest.mmdf') + return Mailbox(path) |
