diff options
Diffstat (limited to 'lcm/lcm/jobs')
-rw-r--r-- | lcm/lcm/jobs/tests.py | 2 | ||||
-rw-r--r-- | lcm/lcm/jobs/views.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lcm/lcm/jobs/tests.py b/lcm/lcm/jobs/tests.py index 3eb60ab2..ca151ebc 100644 --- a/lcm/lcm/jobs/tests.py +++ b/lcm/lcm/jobs/tests.py @@ -30,4 +30,4 @@ class JobsViewTest(TestCase): JobModel(jobid=self.job_id, jobtype='VNF', jobaction='INST', resid='1').save() JobStatusModel(indexid=1, jobid=self.job_id, status='inst', progress=20, descp='inst').save() response = self.client.get("/api/vnflcm/v1/vnf_lc_ops/%s?responseId=123456jhj" % self.job_id) - self.failUnlessEqual(status.HTTP_200_OK, response.status_code) + self.assertEqual(status.HTTP_200_OK, response.status_code) diff --git a/lcm/lcm/jobs/views.py b/lcm/lcm/jobs/views.py index cdd7ba4f..7221bf55 100644 --- a/lcm/lcm/jobs/views.py +++ b/lcm/lcm/jobs/views.py @@ -53,4 +53,4 @@ class JobView(APIView): return Response(data=resp_serializer.data, status=status.HTTP_200_OK) except Exception as e: logger.error(traceback.format_exc()) - return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) + return Response(data={'error': e.args[0]}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) |