equal
deleted
inserted
replaced
497 # This test looks a bit stupid but at least it will probably |
497 # This test looks a bit stupid but at least it will probably |
498 # fail if the controller API changes and if EmbedController is not |
498 # fail if the controller API changes and if EmbedController is not |
499 # updated (which is what happened before this test) |
499 # updated (which is what happened before this test) |
500 req = self.request() |
500 req = self.request() |
501 req.form['url'] = 'http://intranet.logilab.fr/' |
501 req.form['url'] = 'http://intranet.logilab.fr/' |
502 controller = self.env.app.select_controller('embed', req) |
502 controller = self.vreg.select('controllers', 'embed', req) |
503 result = controller.publish(rset=None) |
503 result = controller.publish(rset=None) |
504 |
504 |
505 |
505 |
506 class ReportBugControllerTC(EnvBasedTC): |
506 class ReportBugControllerTC(EnvBasedTC): |
507 |
507 |
508 def test_usable_by_guets(self): |
508 def test_usable_by_guets(self): |
509 req = self.request() |
509 req = self.request() |
510 self.env.app.select_controller('reportbug', req) |
510 self.vreg.select('controllers', 'reportbug', req) |
511 |
511 |
512 |
512 |
513 class SendMailControllerTC(EnvBasedTC): |
513 class SendMailControllerTC(EnvBasedTC): |
514 |
514 |
515 def test_not_usable_by_guets(self): |
515 def test_not_usable_by_guets(self): |
521 |
521 |
522 class JSONControllerTC(EnvBasedTC): |
522 class JSONControllerTC(EnvBasedTC): |
523 |
523 |
524 def ctrl(self, req=None): |
524 def ctrl(self, req=None): |
525 req = req or self.request(url='http://whatever.fr/') |
525 req = req or self.request(url='http://whatever.fr/') |
526 return self.env.app.select_controller('json', req) |
526 return self.vreg.select('controllers', 'json', req) |
527 |
527 |
528 def setup_database(self): |
528 def setup_database(self): |
529 self.pytag = self.add_entity('Tag', name=u'python') |
529 self.pytag = self.add_entity('Tag', name=u'python') |
530 self.cubicwebtag = self.add_entity('Tag', name=u'cubicweb') |
530 self.cubicwebtag = self.add_entity('Tag', name=u'cubicweb') |
531 self.john = self.create_user(u'John') |
531 self.john = self.create_user(u'John') |