server/test/unittest_security.py
changeset 4191 01638461d4b0
parent 3890 d7a270f50f54
child 4691 ae468fae9965
equal deleted inserted replaced
4190:742e3eb16f81 4191:01638461d4b0
   215         cu = cnx.cursor()
   215         cu = cnx.cursor()
   216         cu.execute('SET X upassword %(passwd)s WHERE X eid %(x)s',
   216         cu.execute('SET X upassword %(passwd)s WHERE X eid %(x)s',
   217                    {'x': ueid, 'passwd': 'newpwd'}, 'x')
   217                    {'x': ueid, 'passwd': 'newpwd'}, 'x')
   218         cnx.commit()
   218         cnx.commit()
   219         cnx.close()
   219         cnx.close()
   220         cnx = self.login('user', 'newpwd')
   220         cnx = self.login('user', password='newpwd')
   221 
   221 
   222     def test_user_cant_change_other_upassword(self):
   222     def test_user_cant_change_other_upassword(self):
   223         ueid = self.create_user('otheruser').eid
   223         ueid = self.create_user('otheruser').eid
   224         cnx = self.login('iaminusersgrouponly')
   224         cnx = self.login('iaminusersgrouponly')
   225         cu = cnx.cursor()
   225         cu = cnx.cursor()