Updated doctests
authorThierry Florac <tflorac@ulthar.net>
Wed, 16 Jan 2019 10:48:33 +0100
changeset 317 66a46827a3e1
parent 316 0cb1711cdd41
child 318 12e519cc367c
Updated doctests
src/pyams_utils/doctests/request.txt
--- a/src/pyams_utils/doctests/request.txt	Wed Jan 16 10:45:44 2019 +0100
+++ b/src/pyams_utils/doctests/request.txt	Wed Jan 16 10:48:33 2019 +0100
@@ -66,3 +66,13 @@
     >>> with RequestContext(request):
     ...     instance.my_property()
     1
+
+The "copy_request" function  is used to clone another request. All request methods and properties
+defined via "add_request_method()" are kept, as "registry" and "root" attributes:
+
+    >>> from pyams_utils.request import copy_request
+    >>> request2 = copy_request(request)
+    >>> request2.registry is request.registry
+    True
+    >>> request2.root is None
+    True