server/test/unittest_security.py
changeset 4764 ec9c20c6b9f7
parent 4711 7ef3b029e10b
child 4787 dc07678c4935
--- a/server/test/unittest_security.py	Wed Mar 03 17:56:04 2010 +0100
+++ b/server/test/unittest_security.py	Wed Mar 03 17:59:05 2010 +0100
@@ -436,8 +436,8 @@
         rset = cu.execute('CWUser X WHERE X eid %(x)s', {'x': anon.eid}, 'x')
         self.assertEquals(rset.rows, [[anon.eid]])
         # but can't modify it
-        cu.execute('SET X login "toto" WHERE X eid %(x)s', {'x': anon.eid})
-        self.assertRaises(Unauthorized, cnx.commit)
+        self.assertRaises(Unauthorized,
+                          cu.execute, 'SET X login "toto" WHERE X eid %(x)s', {'x': anon.eid})
 
     def test_in_group_relation(self):
         cnx = self.login('iaminusersgrouponly')