devtools/testlib.py
branchstable
changeset 5247 3c8f6e6014f4
parent 5229 67dbd07a05f3
child 5249 842a40cade9a
child 5268 b4bb59824d72
equal deleted inserted replaced
5245:385c2351153e 5247:3c8f6e6014f4
   490         return ctrl.publish(), req
   490         return ctrl.publish(), req
   491 
   491 
   492     def app_publish(self, req, path='view'):
   492     def app_publish(self, req, path='view'):
   493         return self.app.publish(path, req)
   493         return self.app.publish(path, req)
   494 
   494 
   495     def ctrl_publish(self, req):
   495     def ctrl_publish(self, req, ctrl='edit'):
   496         """call the publish method of the edit controller"""
   496         """call the publish method of the edit controller"""
   497         ctrl = self.vreg['controllers'].select('edit', req)
   497         ctrl = self.vreg['controllers'].select(ctrl, req)
   498         try:
   498         try:
   499             result = ctrl.publish()
   499             result = ctrl.publish()
   500             req.cnx.commit()
   500             req.cnx.commit()
   501         except web.Redirect:
   501         except web.Redirect:
   502             req.cnx.commit()
   502             req.cnx.commit()