connection_test.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:convirt 作者: fromanirh 项目源码 文件源码
def test_open_auth_ignored(self):
        def req(credentials, user_data):
            for cred in credentials:
                if cred[0] == libvirt.VIR_CRED_AUTHNAME:
                    cred[4] = 'convirt'
                elif cred[0] == libvirt.VIR_CRED_PASSPHRASE:
                    cred[4] = 'ignored'
            return 0

        auth = [[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE],
                req, None]

        conn = convirt.openAuth('convirt:///system', auth)
        self.assertTrue(conn)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号