Replace the old unit tests with new functional tests

This commit is contained in:
Jeff Bradberry
2019-04-09 15:00:06 -04:00
parent 7c743904b0
commit e25adca233
2 changed files with 115 additions and 0 deletions

View File

@@ -1738,6 +1738,12 @@ class HostInsights(GenericAPIView):
data = self._get_insights(platform_id, session, headers)
return Response(data, status=status.HTTP_200_OK)
def handle_exception(self, exc):
# Continue supporting the slightly different way we have handled error responses on this view.
response = super().handle_exception(exc)
response.data['error'] = response.data.pop('detail')
return response
class GroupList(ListCreateAPIView):