devtools/testlib.py
branchstable
changeset 5268 b4bb59824d72
parent 5267 7bac6791bbc2
parent 5247 3c8f6e6014f4
child 5274 16461f675734
child 5377 84d14ddfae13
equal deleted inserted replaced
5267:7bac6791bbc2 5268:b4bb59824d72
   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()