web/test/unittest_views_basecontrollers.py
branchstable
changeset 6412 370357e68837
parent 6410 2e7a7b0829ed
child 6796 e70ca9abfc51
--- a/web/test/unittest_views_basecontrollers.py	Fri Oct 08 07:44:22 2010 +0200
+++ b/web/test/unittest_views_basecontrollers.py	Fri Oct 08 07:48:37 2010 +0200
@@ -285,26 +285,6 @@
         self.assertItemsEqual(usergroups, ['managers'])
         self.assertEqual(get_pending_deletes(req), [])
 
-    # def test_custom_attribute_handler(self):
-    #     def custom_login_edit(self, formparams, value, relations):
-    #         formparams['login'] = value.upper()
-    #         relations.append('X login %(login)s')
-    #     CWUser.custom_login_edit = custom_login_edit
-    #     try:
-    #         user = self.user()
-    #         eid = repr(user.eid)
-    #         req = self.request()
-    #         req.form = {
-    #             'eid': eid,
-    #             '__type:'+eid:  'CWUser',
-    #             'login:'+eid: u'foo',
-    #             }
-    #         path, params = self.expect_redirect_publish(req, 'edit')
-    #         rset = self.execute('Any L WHERE X eid %(x)s, X login L', {'x': user.eid}, 'x')
-    #         self.assertEqual(rset[0][0], 'FOO')
-    #     finally:
-    #         del CWUser.custom_login_edit
-
     def test_redirect_apply_button(self):
         redirectrql = rql_for_eid(4012) # whatever
         req = self.request()
@@ -323,7 +303,7 @@
         self.failUnless(path.startswith('blogentry/'))
         eid = path.split('/')[1]
         self.assertEqual(params['vid'], 'edition')
-        self.assertNotEquals(int(eid), 4012)
+        self.assertNotEqual(int(eid), 4012)
         self.assertEqual(params['__redirectrql'], redirectrql)
         self.assertEqual(params['__redirectvid'], 'primary')
         self.assertEqual(params['__redirectparams'], 'toto=tutu&tata=titi')