def test_server_exception_msg_only(self):
error_body = "test error msg"
error_body = _get_error_body(detail=error_body)
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.INTERNAL_SERVER_ERROR)
self.assertRaises(exc.InternalServerError,
client.json_request,
'GET', 'redfish/v1')
评论列表
文章目录