diff -r 7e16e056eecb -r 31bb51ea5485 web/test/unittest_views_basecontrollers.py --- a/web/test/unittest_views_basecontrollers.py Wed Sep 14 09:10:58 2011 +0200 +++ b/web/test/unittest_views_basecontrollers.py Wed Sep 14 09:11:50 2011 +0200 @@ -40,11 +40,11 @@ class EditControllerTC(CubicWebTC): def setUp(self): CubicWebTC.setUp(self) - self.failUnless('users' in self.schema.eschema('CWGroup').get_groups('read')) + self.assertTrue('users' in self.schema.eschema('CWGroup').get_groups('read')) def tearDown(self): CubicWebTC.tearDown(self) - self.failUnless('users' in self.schema.eschema('CWGroup').get_groups('read')) + self.assertTrue('users' in self.schema.eschema('CWGroup').get_groups('read')) def test_noparam_edit(self): """check behaviour of this controller without any form parameter @@ -107,7 +107,7 @@ path, params = self.expect_redirect_publish(req, 'edit') cnx.commit() # commit to check we don't get late validation error for instance self.assertEqual(path, 'cwuser/user') - self.failIf('vid' in params) + self.assertFalse('vid' in params) def test_user_editing_itself_no_relation(self): """checking we can edit an entity without specifying some required @@ -308,7 +308,7 @@ '__action_apply': '', } path, params = self.expect_redirect_publish(req, 'edit') - self.failUnless(path.startswith('blogentry/')) + self.assertTrue(path.startswith('blogentry/')) eid = path.split('/')[1] self.assertEqual(params['vid'], 'edition') self.assertNotEqual(int(eid), 4012) @@ -442,7 +442,7 @@ 'title-subject:A': u'"13:03:40"', 'content-subject:A': u'"13:03:43"',} path, params = self.expect_redirect_publish(req, 'edit') - self.failUnless(path.startswith('blogentry/')) + self.assertTrue(path.startswith('blogentry/')) eid = path.split('/')[1] e = self.execute('Any C, T WHERE C eid %(x)s, C content T', {'x': eid}).get_entity(0, 0) self.assertEqual(e.title, '"13:03:40"') @@ -578,12 +578,12 @@ rset = self.john.as_rset() rset.req = req source = ctrl.publish() - self.failUnless(source.startswith('\n' + STRICT_DOCTYPE + + self.assertTrue(source.startswith('\n' + STRICT_DOCTYPE + u'
') ) req.xhtml_browser = lambda: False source = ctrl.publish() - self.failUnless(source.startswith('
')) + self.assertTrue(source.startswith('
')) # def test_json_exec(self): # rql = 'Any T,N WHERE T is Tag, T name N'