summaryrefslogtreecommitdiff
path: root/src/mailman/testing/documentation.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-07-16 15:44:07 -0400
committerBarry Warsaw2016-07-16 15:44:07 -0400
commitdbde6231ec897379ed38ed4cd015b8ab20ed5fa1 (patch)
tree1226d06a238314262a1d04d0bbf9c4dc0b72c309 /src/mailman/testing/documentation.py
parent3387791beb7112dbe07664041f117fdcc20df53d (diff)
downloadmailman-dbde6231ec897379ed38ed4cd015b8ab20ed5fa1.tar.gz
mailman-dbde6231ec897379ed38ed4cd015b8ab20ed5fa1.tar.zst
mailman-dbde6231ec897379ed38ed4cd015b8ab20ed5fa1.zip
Diffstat (limited to 'src/mailman/testing/documentation.py')
-rw-r--r--src/mailman/testing/documentation.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mailman/testing/documentation.py b/src/mailman/testing/documentation.py
index f3a6e335a..29629fe1b 100644
--- a/src/mailman/testing/documentation.py
+++ b/src/mailman/testing/documentation.py
@@ -25,7 +25,8 @@ from inspect import isfunction, ismethod
from mailman import public
from mailman.app.lifecycle import create_list
from mailman.config import config
-from mailman.testing.helpers import call_api, specialized_message_from_string
+from mailman.testing.helpers import (
+ call_api, get_queue_messages, specialized_message_from_string, subscribe)
from mailman.testing.layers import SMTPLayer
@@ -92,7 +93,7 @@ def call_http(url, data=None, method=None, username=None, password=None):
content, response = call_api(url, data, method, username, password)
if content is None:
for header in sorted(response):
- print('{0}: {1}'.format(header, response[header]))
+ print('{}: {}'.format(header, response[header]))
return None
return content
@@ -145,9 +146,11 @@ def setup(testobj):
testobj.globs['dump_json'] = dump_json
testobj.globs['dump_msgdata'] = dump_msgdata
testobj.globs['dump_list'] = dump_list
+ testobj.globs['get_queue_messages'] = get_queue_messages
testobj.globs['message_from_string'] = specialized_message_from_string
testobj.globs['smtpd'] = SMTPLayer.smtpd
testobj.globs['stop'] = stop
+ testobj.globs['subscribe'] = subscribe
testobj.globs['transaction'] = config.db
# Add this so that cleanups can be automatically added by the doctest.
testobj.globs['cleanups'] = []