test_pool.py 文件源码

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

项目:kuryr-kubernetes 作者: openstack 项目源码 文件源码
def test_do_GET_show_exception(self):
        method = 'show'
        method_resp = "251f748d-2a0d-4143-bce8-2e616f7a6a4a"
        path = "http://localhost/showPool"
        pool_key = [u"10.0.0.6", u"9d2b45c4efaa478481c30340b49fd4d2",
                    [u"00efc78c-f11c-414a-bfcd-a82e16dc07d1",
                     u"fd6b13dc-7230-4cbe-9237-36b4614bc6b5"]]
        body = jsonutils.dumps({"pool_key": pool_key})
        headers = {'Content-Type': 'application/json', 'Connection': 'close'}
        headers['Content-Length'] = len(body)
        trigger_exception = True
        formated_key = (pool_key[0], pool_key[1], tuple(sorted(pool_key[2])))
        expected_resp = ('Error showing pool: {0}.'
                         .format(formated_key)).encode()

        self._do_GET_helper(method, method_resp, path, headers, body,
                            expected_resp, trigger_exception, pool_key)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号