test_kong_consumer.py 文件源码

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

项目:ansible-kong-module 作者: toast38coza 项目源码 文件源码
def test_configure_for_plugin(self):

        expected_url = "{}/consumers/joe/auth-key" . format (mock_kong_admin_url)
        responses.add(responses.POST, expected_url, status=201)

        data = { "key": "123" }
        response = self.api.configure_for_plugin("joe", "auth-key", data)

        assert response.status_code == 201

        body = parse_qs(responses.calls[0].request.body)
        body_exactly = parse_qsl(responses.calls[0].request.body)
        assert body['key'][0] == "123", \
            "Expect correct. data to be sent. Got: {}" . format (body_exactly)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号