sobjects/test/unittest_notification.py
changeset 2650 18aec79ec3a3
parent 2637 07103211e511
child 2773 b2530e3e0afb
child 2920 64322aa83a1d
--- a/sobjects/test/unittest_notification.py	Mon Aug 03 09:37:13 2009 +0200
+++ b/sobjects/test/unittest_notification.py	Mon Aug 03 10:50:57 2009 +0200
@@ -56,8 +56,8 @@
         self.execute('INSERT CWProperty X: X pkey "ui.language", X value "fr", X for_user U '
                      'WHERE U eid %(x)s', {'x': urset[0][0]})
         self.commit() # commit so that admin get its properties updated
-        finder = self.vreg.select('components', 'recipients_finder', self.request(),
-                                  rset=urset)
+        finder = self.vreg['components'].select('recipients_finder',
+                                                self.request(), rset=urset)
         self.set_option('default-recipients-mode', 'none')
         self.assertEquals(finder.recipients(), [])
         self.set_option('default-recipients-mode', 'users')
@@ -73,8 +73,9 @@
         req = self.session()
         u = self.create_user('toto', req=req)
         assert u.req
+        assert u.rset
         self.execute('SET X in_state S WHERE X eid %s, S name "deactivated"' % u.eid)
-        v = self.vreg.select('views', 'notif_status_change', req, rset=u.rset, row=0)
+        v = self.vreg['views'].select('notif_status_change', req, rset=u.rset, row=0)
         content = v.render(row=0, comment='yeah',
                            previous_state='activated',
                            current_state='deactivated')