diff -r bdc3dc94d744 -r 470d8e828fda web/test/unittest_form.py --- a/web/test/unittest_form.py Fri Sep 24 18:20:57 2010 +0200 +++ b/web/test/unittest_form.py Fri Sep 24 18:20:59 2010 +0200 @@ -36,10 +36,10 @@ def test_form_field_format(self): form = FieldsForm(self.request(), None) - self.assertEquals(StringField().format(form), 'text/html') + self.assertEqual(StringField().format(form), 'text/html') self.execute('INSERT CWProperty X: X pkey "ui.default-text-format", X value "text/rest", X for_user U WHERE U login "admin"') self.commit() - self.assertEquals(StringField().format(form), 'text/rest') + self.assertEqual(StringField().format(form), 'text/rest') class EntityFieldsFormTC(CubicWebTC): @@ -70,7 +70,7 @@ form = self.vreg['forms'].select('edition', self.req, entity=e) unrelated = [rview for rview, reid in form.field_by_name('in_group', 'subject').choices(form)] # should be default groups but owners, i.e. managers, users, guests - self.assertEquals(unrelated, [u'guests', u'managers', u'users']) + self.assertEqual(unrelated, [u'guests', u'managers', u'users']) def test_consider_req_form_params(self): e = self.vreg['etypes'].etype_class('CWUser')(self.request()) @@ -79,7 +79,7 @@ field = StringField(name='login', role='subject', eidparam=True) form.append_field(field) form.build_context({}) - self.assertEquals(field.widget.values(form, field), (u'toto',)) + self.assertEqual(field.widget.values(form, field), (u'toto',)) def test_linkto_field_duplication(self): @@ -144,7 +144,7 @@ form = RTFForm(self.req, redirect_path='perdu.com', entity=state) # make it think it can use fck editor anyway form.field_by_name('description', 'subject').format = lambda x: 'text/html' - self.assertTextEquals(self._render_entity_field('description', form), + self.assertMultiLineEqual(self._render_entity_field('description', form), expected % {'eid': state.eid}) @@ -174,7 +174,7 @@ file = self.req.create_entity('File', data_name=u"pouet.txt", data_encoding=u'UTF-8', data=Binary('new widgets system')) form = FFForm(self.req, redirect_path='perdu.com', entity=file) - self.assertTextEquals(self._render_entity_field('data', form), + self.assertMultiLineEqual(self._render_entity_field('data', form), '''