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)
test_kong_consumer.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录