def test_get_other_error_with_message(self, mock):
url = '{}/v2/i_am_bogus'.format(self.client.base_url)
mock.get(
url=url,
status_code=400,
json={
'errors': [
{'error': 'I am bogus'},
{'error': 'I am verbose'}
]
}
)
with self.assertRaisesRegexp(
newrelic_cli.exceptions.NewRelicException,
'The following errors were returned by server'
):
self.client._get(url)
评论列表
文章目录