[tests] make unittest_views_actions pass again
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 24 Sep 2009 20:40:20 +0200
changeset 3466 beabe54a8664
parent 3465 01616e5fa590
child 3467 a6405235aac6
[tests] make unittest_views_actions pass again
web/test/unittest_views_actions.py
--- a/web/test/unittest_views_actions.py	Thu Sep 24 20:39:08 2009 +0200
+++ b/web/test/unittest_views_actions.py	Thu Sep 24 20:40:20 2009 +0200
@@ -14,19 +14,19 @@
         req = self.request(__message='bla bla bla', vid='rss', rql='CWUser X')
         rset = self.execute('CWUser X')
         actions = self.vreg['actions'].poss_visible_objects(req, rset=rset)
-        vaction = [action for action in actions if action.id == 'view'][0]
+        vaction = [action for action in actions if action.__regid__ == 'view'][0]
         self.assertEquals(vaction.url(), 'http://testing.fr/cubicweb/view?rql=CWUser%20X')
 
     def test_sendmail_action(self):
         req = self.request()
         rset = self.execute('Any X WHERE X login "admin"', req=req)
         actions = self.vreg['actions'].poss_visible_objects(req, rset=rset)
-        self.failUnless([action for action in actions if action.id == 'sendemail'])
+        self.failUnless([action for action in actions if action.__regid__ == 'sendemail'])
         self.login('anon')
         req = self.request()
         rset = self.execute('Any X WHERE X login "anon"', req=req)
         actions = self.vreg['actions'].poss_visible_objects(req, rset=rset)
-        self.failIf([action for action in actions if action.id == 'sendemail'])
+        self.failIf([action for action in actions if action.__regid__ == 'sendemail'])
 
 if __name__ == '__main__':
     unittest_main()