diff options
Diffstat (limited to 'mailman/testing/helpers.py')
| -rw-r--r-- | mailman/testing/helpers.py | 7 |
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) |
