summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lcm/ns/tests/test_ns_manual_scale.py4
-rw-r--r--lcm/ns/views/deprecated/common.py3
2 files changed, 3 insertions, 4 deletions
diff --git a/lcm/ns/tests/test_ns_manual_scale.py b/lcm/ns/tests/test_ns_manual_scale.py
index e4c3c71f..4c31611b 100644
--- a/lcm/ns/tests/test_ns_manual_scale.py
+++ b/lcm/ns/tests/test_ns_manual_scale.py
@@ -131,7 +131,7 @@ class TestNsManualScale(TestCase):
mock_start.side_effect = NSLCMException("NS scale failed.")
response = self.client.post("/api/nslcm/v1/ns/%s/scale" % self.ns_inst_id, data={}, format='json')
self.assertEqual(response.status_code, status.HTTP_500_INTERNAL_SERVER_ERROR)
- self.assertIn("detail", response.data)
+ self.assertIn("error", response.data)
@mock.patch.object(NSManualScaleService, 'start')
def test_ns_manual_scale_when_ns_not_exist(self, mock_start):
@@ -139,4 +139,4 @@ class TestNsManualScale(TestCase):
scale_ns_json = SCALE_NS_DICT.copy()
response = self.client.post("/api/nslcm/v1/ns/11/scale", data=scale_ns_json, format='json')
self.assertEqual(response.status_code, status.HTTP_500_INTERNAL_SERVER_ERROR)
- self.assertIn("detail", response.data)
+ self.assertIn("error", response.data)
diff --git a/lcm/ns/views/deprecated/common.py b/lcm/ns/views/deprecated/common.py
index ac1d312c..379a9481 100644
--- a/lcm/ns/views/deprecated/common.py
+++ b/lcm/ns/views/deprecated/common.py
@@ -27,8 +27,7 @@ logger = logging.getLogger(__name__)
def make_error_resp(status, detail):
return Response(
data={
- 'status': status,
- 'detail': detail
+ 'error': detail
},
status=status
)