def test_set_password(self):
username = 'bob'
cherrypy.engine.publish('ldap-set-password', username, self.hashes)
bob = cherrypy.engine.publish('ldap-user-by-uid', 'bob').pop()
self.assertEqual(self.hashes['userPassword'] in bob['userPassword'], True)
self.assertEqual(self.hashes['sambaNTPassword'] in bob['sambaNTPassword'], True)
self.assertEqual(cherrypy.engine.publish('ldap-auth', 'bob', 'changeme'), [True])
评论列表
文章目录