cubicweb/web/test/unittest_application.py
changeset 12503 b01dd0ef43aa
parent 12355 c703dc95c82e
child 12567 26744ad37953
equal deleted inserted replaced
12502:e651d5f24cb5 12503:b01dd0ef43aa
   758         with self.admin_access.web_request() as req:
   758         with self.admin_access.web_request() as req:
   759             # expect a rset with None in [0][0]
   759             # expect a rset with None in [0][0]
   760             req.form['rql'] = 'rql:Any OV1, X WHERE X custom_workflow OV1?'
   760             req.form['rql'] = 'rql:Any OV1, X WHERE X custom_workflow OV1?'
   761             self.app_handle_request(req)
   761             self.app_handle_request(req)
   762 
   762 
   763     def test_handle_deprecation(self):
       
   764         """Test deprecation warning for *_handle methods."""
       
   765         with self.admin_access.web_request(url='foo') as req:
       
   766             with self.assertWarns(DeprecationWarning) as cm:
       
   767                 self.app.core_handle(req, 'foo')
       
   768             self.assertIn('path argument got removed from "core_handle"',
       
   769                           str(cm.warning))
       
   770             with self.assertWarns(DeprecationWarning) as cm:
       
   771                 self.app.main_handle_request('foo', req)
       
   772             self.assertIn('entry point arguments are now (req, path)',
       
   773                           str(cm.warning))
       
   774 
       
   775 
   763 
   776 if __name__ == '__main__':
   764 if __name__ == '__main__':
   777     unittest_main()
   765     unittest_main()