From dbde6231ec897379ed38ed4cd015b8ab20ed5fa1 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 16 Jul 2016 15:44:07 -0400 Subject: New template system. Closes #249 The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details. --- src/mailman/testing/documentation.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mailman/testing/documentation.py') 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'] = [] -- cgit v1.2.3-70-g09d2