devtools/testlib.py
changeset 5249 842a40cade9a
parent 5238 31c12863fd9d
parent 5247 3c8f6e6014f4
child 5274 16461f675734
equal deleted inserted replaced
5246:3246b1f88a18 5249:842a40cade9a
   495         return ctrl.publish(), req
   495         return ctrl.publish(), req
   496 
   496 
   497     def app_publish(self, req, path='view'):
   497     def app_publish(self, req, path='view'):
   498         return self.app.publish(path, req)
   498         return self.app.publish(path, req)
   499 
   499 
   500     def ctrl_publish(self, req):
   500     def ctrl_publish(self, req, ctrl='edit'):
   501         """call the publish method of the edit controller"""
   501         """call the publish method of the edit controller"""
   502         ctrl = self.vreg['controllers'].select('edit', req)
   502         ctrl = self.vreg['controllers'].select(ctrl, req)
   503         try:
   503         try:
   504             result = ctrl.publish()
   504             result = ctrl.publish()
   505             req.cnx.commit()
   505             req.cnx.commit()
   506         except web.Redirect:
   506         except web.Redirect:
   507             req.cnx.commit()
   507             req.cnx.commit()