web/test/unittest_views_editforms.py
changeset 2661 f8df42c9da6b
parent 2643 9976f511003b
child 2773 b2530e3e0afb
child 2920 64322aa83a1d
--- a/web/test/unittest_views_editforms.py	Mon Aug 03 15:57:05 2009 +0200
+++ b/web/test/unittest_views_editforms.py	Mon Aug 03 16:31:30 2009 +0200
@@ -18,8 +18,8 @@
     def test_custom_widget(self):
         AEF.rfields_kwargs.tag_subject_of(('CWUser', 'login', '*'),
                                           {'widget': AutoCompletionWidget(autocomplete_initfunc='get_logins')})
-        form = self.vreg.select('forms', 'edition', self.request(),
-                                entity=self.user())
+        form = self.vreg['forms'].select('edition', self.request(),
+                                         entity=self.user())
         field = form.field_by_name('login')
         self.assertIsInstance(field.widget, AutoCompletionWidget)
         AEF.rfields_kwargs.del_rtag('CWUser', 'login', '*', 'subject')
@@ -116,10 +116,10 @@
 
     def test_edition_form(self):
         rset = self.execute('CWUser X LIMIT 1')
-        form = self.vreg.select('forms', 'edition', rset.req, rset=rset,
+        form = self.vreg['forms'].select('edition', rset.req, rset=rset,
                                 row=0, col=0)
         # should be also selectable by specifying entity
-        self.vreg.select('forms', 'edition', rset.req,
+        self.vreg['forms'].select('edition', rset.req,
                          entity=rset.get_entity(0, 0))
         self.failIf(any(f for f in form.fields if f is None))