Factor out the response handling boilerplate from HostInsights.get_insights

We'll want to reuse it for the API call to /hosts as well.
This commit is contained in:
Jeff Bradberry
2019-03-18 16:37:48 -04:00
parent 8fdc53cb21
commit 95b17892ee
2 changed files with 38 additions and 15 deletions

View File

@@ -148,7 +148,7 @@ class TestHostInsights():
(msg, code) = view.get_insights('https://myexample.com/whocares/me/', 'ignore', 'ignore')
assert msg['error'] == (
'Failed to gather reports and maintenance plans from Insights API at URL'
'Failed to access the Insights API at URL'
' https://myexample.com/whocares/me/. Server responded with 500 status code '
'and message mock 500 err msg')