auth_data_test.py 文件源码

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

项目:vsphere-storage-for-docker 作者: vmware 项目源码 文件源码
def test_set_description(self):
        vms = [(self.vm1_uuid, self.vm1_name)]
        privileges = self.get_privileges()
        error_info, tenant1 = self.auth_mgr.create_tenant(name=self.tenant_name,
                                                          description='Some tenant',
                                                          vms=vms,
                                                          privileges=privileges)

        self.assertEqual(error_info, None)
        self.assertTrue(uuid.UUID(tenant1.id))
        error_info = tenant1.set_description(self.auth_mgr.conn, 'new description')
        self.assertEqual(error_info, None)
        error_info, tenants_row = auth.get_row_from_tenants_table(self.auth_mgr.conn, tenant1.id)
        self.assertEqual(error_info, None)
        expected_output = 'new description'
        actual_output = tenants_row[auth_data_const.COL_DESCRIPTION]
        self.assertEqual(actual_output, expected_output)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号