From c34a89714c1389fac6d5161c89a25fbd065f24a5 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Tue, 11 Jul 2017 14:25:12 -0400 Subject: [PATCH] rework hosts without insights creds error message --- awx/api/views.py | 2 +- awx/main/tests/unit/api/test_views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/api/views.py b/awx/api/views.py index 3b2d489186..074896002f 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -2119,7 +2119,7 @@ class HostInsights(GenericAPIView): if host.inventory and host.inventory.insights_credential: cred = host.inventory.insights_credential else: - return Response(dict(error=_('No Insights Credential found for the Inventory, "{}", that this host belongs to.').format(host.inventory.name)), status=status.HTTP_404_NOT_FOUND) + return Response(dict(error=_('The Insights Credential for "{}" was not found.').format(host.inventory.name)), status=status.HTTP_404_NOT_FOUND) url = settings.INSIGHTS_URL_BASE + '/r/insights/v3/systems/{}/reports/'.format(host.insights_system_id) (username, password) = self._extract_insights_creds(cred) diff --git a/awx/main/tests/unit/api/test_views.py b/awx/main/tests/unit/api/test_views.py index 08f6b9b827..3774668b35 100644 --- a/awx/main/tests/unit/api/test_views.py +++ b/awx/main/tests/unit/api/test_views.py @@ -199,5 +199,5 @@ class TestHostInsights(): resp = view.get(None) - assert resp.data['error'] == 'No Insights Credential found for the Inventory, "inventory_name_here", that this host belongs to.' + assert resp.data['error'] == 'The Insights Credential for "inventory_name_here" was not found.' assert resp.status_code == 404