def test_add_sshpubkey(self):
# key validation happens at the model level; using a short key for brevity
sshpubkey = 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAo1d01QraTlMVSsbxNrRFi9wrf+M7Q== fakekey'
cherrypy.engine.publish('ldap-add-key', 'bob', sshpubkey)
bob = cherrypy.engine.publish('ldap-user-by-uid', 'bob').pop()
self.assertEqual(sshpubkey in bob['sshPublicKey'], True)
评论列表
文章目录