equal
deleted
inserted
replaced
454 # {'x': self.user.eid}) |
454 # {'x': self.user.eid}) |
455 |
455 |
456 rset = cu.execute('CWUser X WHERE X eid %(x)s', {'x': anon.eid}, 'x') |
456 rset = cu.execute('CWUser X WHERE X eid %(x)s', {'x': anon.eid}, 'x') |
457 self.assertEquals(rset.rows, [[anon.eid]]) |
457 self.assertEquals(rset.rows, [[anon.eid]]) |
458 # but can't modify it |
458 # but can't modify it |
459 self.assertRaises(Unauthorized, |
459 cu.execute('SET X login "toto" WHERE X eid %(x)s', {'x': anon.eid}) |
460 cu.execute, 'SET X login "toto" WHERE X eid %(x)s', {'x': anon.eid}) |
460 self.assertRaises(Unauthorized, cnx.commit) |
461 |
461 |
462 def test_in_group_relation(self): |
462 def test_in_group_relation(self): |
463 cnx = self.login('iaminusersgrouponly') |
463 cnx = self.login('iaminusersgrouponly') |
464 cu = cnx.cursor() |
464 cu = cnx.cursor() |
465 rql = u"DELETE U in_group G WHERE U login 'admin'" |
465 rql = u"DELETE U in_group G WHERE U login 'admin'" |