diff options
-rw-r--r-- | catalog/packages/ns_package.py | 2 | ||||
-rw-r--r-- | catalog/packages/tests/test_ns.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/catalog/packages/ns_package.py b/catalog/packages/ns_package.py index db44b2fc..2ff2b13e 100644 --- a/catalog/packages/ns_package.py +++ b/catalog/packages/ns_package.py @@ -89,7 +89,7 @@ def parse_nsd(csar_id, inputs): 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: diff --git a/catalog/packages/tests/test_ns.py b/catalog/packages/tests/test_ns.py index 25295cb4..34e23149 100644 --- a/catalog/packages/tests/test_ns.py +++ b/catalog/packages/tests/test_ns.py @@ -497,6 +497,7 @@ class TestNsPackage(TestCase): 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."}) |