server/test/unittest_security.py
changeset 4915 d657b89df9f4
parent 4787 dc07678c4935
child 5174 78438ad513ca
child 5419 0b7805928a27
--- a/server/test/unittest_security.py	Tue Mar 16 16:32:36 2010 +0100
+++ b/server/test/unittest_security.py	Tue Mar 16 17:19:10 2010 +0100
@@ -456,8 +456,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
-        self.assertRaises(Unauthorized,
-                          cu.execute, 'SET X login "toto" WHERE X eid %(x)s', {'x': anon.eid})
+        cu.execute('SET X login "toto" WHERE X eid %(x)s', {'x': anon.eid})
+        self.assertRaises(Unauthorized, cnx.commit)
 
     def test_in_group_relation(self):
         cnx = self.login('iaminusersgrouponly')