From 33ad44bc97f08df71f227f6f2a006e770a75c353 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 1 Apr 2011 18:51:29 -0400 Subject: * Re-organize the interface between buildout.cfg and the zope.testing layer initialization. buildout.cfg is now really simple; it calls one method. That method does all the relevant layer initializations. This better localizes what has to be set up before testing can even begin. * IUsers now have a created_on property which contains the datetime at which the user record was created. * Rework the date and uid factories so that they consult the MockAndMonkeyLayer for the current testing flag. Also, those factories register themselves with the layer so that they'll get automatically reset between tests, without the layer actually having to know about them. * Move the User model object initialization into User.__init__() from the user manager. The User now also adds itself to the store. * Add a 'uid factory' for unique id creation, which is test suite aware. --- src/mailman/tests/test_documentation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mailman/tests/test_documentation.py') diff --git a/src/mailman/tests/test_documentation.py b/src/mailman/tests/test_documentation.py index 23cc189d0..2a72a367f 100644 --- a/src/mailman/tests/test_documentation.py +++ b/src/mailman/tests/test_documentation.py @@ -126,7 +126,7 @@ def dump_list(list_of_things, key=str): def call_http(url, data=None, method=None, username=None, password=None): - """'Call' a URL with a given HTTP method and return the resulting object. + """'Call a URL with a given HTTP method and return the resulting object. The object will have been JSON decoded. @@ -142,6 +142,8 @@ def call_http(url, data=None, method=None, username=None, password=None): :param password: The HTTP Basic Auth password. None means use the value from the configuration. :type username: str + :return: The decoded JSON data structure. + :raises HTTPError: when a non-2xx return code is received. """ headers = {} if data is not None: -- cgit v1.2.3-70-g09d2