[devtool-testlib] add deprecated entry point for publish method
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 11 Apr 2012 13:28:10 +0200
changeset 8363 3f3b4e4c63f5
parent 8362 4ac28926cd15
child 8364 b360112424d2
[devtool-testlib] add deprecated entry point for publish method 6c2119509fac renamed ``publish`` to ``handle_request``. And removed the older testlib function (because the semantic of handle_request is quite different from the publish one). However it seems to do more harm that good and I'm adding proxy with deprecation warning for those.
devtools/testlib.py
doc/3.15.rst
--- a/devtools/testlib.py	Wed Apr 11 13:22:47 2012 +0200
+++ b/devtools/testlib.py	Wed Apr 11 13:28:10 2012 +0200
@@ -611,6 +611,11 @@
     def app_handle_request(self, req, path='view'):
         return self.app.core_handle(req, path)
 
+    @deprecated("[3.15] app_handle_request is the new and better way"
+                " (beware of small semantic changes)")
+    def app_publish(self, *args, **kwargs):
+        return self.app_handle_request(*args, **kwargs)
+
     def ctrl_publish(self, req, ctrl='edit'):
         """call the publish method of the edit controller"""
         ctrl = self.vreg['controllers'].select(ctrl, req, appli=self.app)
@@ -680,6 +685,12 @@
         location = req.get_response_header('location')
         return self._parse_location(req, location)
 
+    @deprecated("[3.15] expect_redirect_handle_request is the new and better way"
+                " (beware of small semantic changes)")
+    def expect_redirect_publish(self, *args, **kwargs):
+        return self.expect_redirect_handle_request(*args, **kwargs)
+
+
     def set_auth_mode(self, authmode, anonuser=None):
         self.set_option('auth-mode', authmode)
         self.set_option('anonymous-user', anonuser)
--- a/doc/3.15.rst	Wed Apr 11 13:22:47 2012 +0200
+++ b/doc/3.15.rst	Wed Apr 11 13:28:10 2012 +0200
@@ -2,7 +2,6 @@
 ==========================
 
 
-
 New functionnalities
 --------------------