fix tests
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 20 Jan 2010 08:43:41 +0100
changeset 4276 e2ed81c20e74
parent 4274 4601ba407ed6
child 4277 35cd057339b2
fix tests
web/test/unittest_application.py
--- a/web/test/unittest_application.py	Tue Jan 19 18:26:22 2010 +0100
+++ b/web/test/unittest_application.py	Wed Jan 20 08:43:41 2010 +0100
@@ -184,9 +184,9 @@
         values = forminfo['values']
         self.assertEquals(values['login-subject:'+eid], '')
         self.assertEquals(values['eid'], eid)
-        errors = forminfo['errors']
-        self.assertEquals(errors.entity, user.eid)
-        self.assertEquals(errors.errors['login'], 'required attribute')
+        error = forminfo['error']
+        self.assertEquals(error.entity, user.eid)
+        self.assertEquals(error.errors['login'], 'required attribute')
 
 
     def test_validation_error_dont_loose_subentity_data(self):
@@ -212,9 +212,9 @@
         path, params = self.expect_redirect(lambda x: self.app_publish(x, 'edit'), req)
         forminfo = req.get_session_data('view?vid=edition...')
         self.assertEquals(set(forminfo['eidmap']), set('XY'))
-        self.assertEquals(forminfo['errors'].entity, forminfo['eidmap']['X'])
-        self.assertEquals(forminfo['errors'].errors, {'login': 'required attribute',
-                                                      'upassword': 'required attribute'})
+        self.assertEquals(forminfo['error'].entity, forminfo['eidmap']['X'])
+        self.assertEquals(forminfo['error'].errors, {'login': 'required attribute',
+                                                     'upassword': 'required attribute'})
         self.assertEquals(forminfo['values'], form)
 
     def _test_cleaned(self, kwargs, injected, cleaned):