# HG changeset patch # User Sylvain Thénault # Date 1295026223 -3600 # Node ID 5ac338bc213325f8d2748e8d725c9d61082bdf77 # Parent dc4693820fc7ae232276f6427c006432a963eb01 [doc] update unittest api diff -r dc4693820fc7 -r 5ac338bc2133 doc/book/en/devrepo/testing.rst --- a/doc/book/en/devrepo/testing.rst Fri Jan 14 08:10:01 2011 +0100 +++ b/doc/book/en/devrepo/testing.rst Fri Jan 14 18:30:23 2011 +0100 @@ -196,13 +196,13 @@ blog_entry_2 = req.create_entity('BlogEntry', title=u'yes', content=u'cubicweb yes') blog_entry_2.set_relations(entry_of=cubicweb_blog) - self.assertEquals(len(MAILBOX), 0) + self.assertEqual(len(MAILBOX), 0) self.commit() - self.assertEquals(len(MAILBOX), 2) + self.assertEqual(len(MAILBOX), 2) mail = MAILBOX[0] - self.assertEquals(mail.subject, '[data] hop') + self.assertEqual(mail.subject, '[data] hop') mail = MAILBOX[1] - self.assertEquals(mail.subject, '[data] yes') + self.assertEqual(mail.subject, '[data] yes') Visible actions tests ````````````````````` @@ -229,7 +229,7 @@ def test_admin(self): req = self.request() rset = req.execute('Any C WHERE C is Conference') - self.assertListEquals(self.pactions(req, rset), + self.assertListEqual(self.pactions(req, rset), [('workflow', workflow.WorkflowActions), ('edit', confactions.ModifyAction), ('managepermission', actions.ManagePermissionsAction), @@ -238,7 +238,7 @@ ('generate_badge_action', badges.GenerateBadgeAction), ('addtalkinconf', confactions.AddTalkInConferenceAction) ]) - self.assertListEquals(self.action_submenu(req, rset, 'addrelated'), + self.assertListEqual(self.action_submenu(req, rset, 'addrelated'), [(u'add Track in_conf Conference object', u'http://testing.fr/cubicweb/add/Track' u'?__linkto=in_conf%%3A%(conf)s%%3Asubject&'