summaryrefslogtreecommitdiff
path: root/mailman/testing/helpers.py
diff options
context:
space:
mode:
authorBarry Warsaw2008-12-25 23:57:07 -0500
committerBarry Warsaw2008-12-25 23:57:07 -0500
commitb8e68e7577aa12e0e355aabe2845981f0d73e3b5 (patch)
tree4d988c8de9e29b080ac258d0bc1e4eee8e5ee32b /mailman/testing/helpers.py
parentd4de7996e6d4fb5db04dfed3b3fd12747622b164 (diff)
downloadmailman-b8e68e7577aa12e0e355aabe2845981f0d73e3b5.tar.gz
mailman-b8e68e7577aa12e0e355aabe2845981f0d73e3b5.tar.zst
mailman-b8e68e7577aa12e0e355aabe2845981f0d73e3b5.zip
Added a buildout hack for zope.testing so that we can add our own command line
options to bin/test. More test repair, even though it's cheating. Use a bunch of variables from Defaults.py even though these will have to be moved to the schema.cfg. Update logging initialization to consult the propagate flag from the command line. Also skip mailman.root since this is not a valid logger.
Diffstat (limited to '')
-rw-r--r--mailman/testing/helpers.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mailman/testing/helpers.py b/mailman/testing/helpers.py
index 2f5b4af01..62b0d8d95 100644
--- a/mailman/testing/helpers.py
+++ b/mailman/testing/helpers.py
@@ -80,15 +80,14 @@ class _Bag:
setattr(self, key, value)
-def get_queue_messages(queue):
+def get_queue_messages(queue_name):
"""Return and clear all the messages in the given queue.
- :param queue: An ISwitchboard or a string naming a queue.
+ :param queue_name: A string naming a queue.
:return: A list of 2-tuples where each item contains the message and
message metadata.
"""
- if isinstance(queue, basestring):
- queue = Switchboard(queue)
+ queue = config.switchboards[queue_name]
messages = []
for filebase in queue.files:
msg, msgdata = queue.dequeue(filebase)