def test_server_exception_description_only(self):
error_msg = "test error msg"
error_body = _get_error_body(detail=error_msg)
kwargs = {"valence_url": "http://localhost/"}
client = http.HTTPClient(**kwargs)
client.session = utils.mockSession(
{'Content-Type': 'application/json'},
error_body,
version=1,
status_code=http_client.BAD_REQUEST)
self.assertRaises(exc.BadRequest,
client.json_request,
'GET', 'redfish/v1')
评论列表
文章目录