Change-Id: I4f26ea728a9a099696276404e52c419ea3e6ffa9
Issue-id: VFC-437
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
try:
ns_pkg = NSPackageModel.objects.filter(nsPackageId=csar_id)
if not ns_pkg:
- raise CatalogException("CSAR(%s) does not exist." % csar_id)
+ raise CatalogException("NS CSAR(%s) does not exist." % csar_id)
csar_path = ns_pkg[0].localFilePath
ret = {"model": toscaparser.parse_nsd(csar_path, inputs)}
except CatalogException as e:
resp = self.client.post("/api/catalog/v1/parsernsd",
{"csarId": "1", "inputs": []}, format='json')
self.assertEqual(resp.status_code, status.HTTP_500_INTERNAL_SERVER_ERROR)
+ self.assertEqual(resp.data, {"error": "NS CSAR(1) does not exist."})