summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog/pub/utils/toscaparser/tests.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/catalog/pub/utils/toscaparser/tests.py b/catalog/pub/utils/toscaparser/tests.py
index 39be7f64..e6f47939 100644
--- a/catalog/pub/utils/toscaparser/tests.py
+++ b/catalog/pub/utils/toscaparser/tests.py
@@ -31,23 +31,6 @@ class TestToscaparser(TestCase):
def tearDown(self):
pass
- def test_nsd_parse(self):
- self.remove_temp_dir()
- ran_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/ns/ran.csar"
- nsd_json = parse_nsd(ran_csar)
- metadata = json.loads(nsd_json).get("metadata")
- self.assertEqual("RAN-NS", metadata.get("template_name", ""))
-
- pnf_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/pnf/ran-du.csar"
- nsd_json = parse_nsd(pnf_csar)
- metadata = json.loads(nsd_json).get("metadata")
- self.assertNotEqual("RAN-NS", metadata.get("template_name", ""))
-
- pnf_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/vnf/vgw.csar"
- nsd_json = parse_nsd(pnf_csar)
- metadata = json.loads(nsd_json).get("metadata")
- self.assertNotEqual("RAN-NS", metadata.get("template_name", ""))
-
def test_vnf_parse(self):
self.remove_temp_dir()
csar_path = os.path.dirname(os.path.abspath(__file__)) + "/testdata/vnf"
@@ -68,6 +51,23 @@ class TestToscaparser(TestCase):
metadata = json.loads(pnfd_json).get("metadata")
self.assertEqual("RAN_DU", metadata.get("template_name", ""))
+ def test_nsd_parse(self):
+ self.remove_temp_dir()
+ pnf_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/pnf/ran-du.csar"
+ nsd_json = parse_nsd(pnf_csar)
+ metadata = json.loads(nsd_json).get("metadata")
+ self.assertNotEqual("RAN-NS", metadata.get("template_name", ""))
+
+ pnf_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/vnf/vgw.csar"
+ nsd_json = parse_nsd(pnf_csar)
+ metadata = json.loads(nsd_json).get("metadata")
+ self.assertNotEqual("RAN-NS", metadata.get("template_name", ""))
+
+ ran_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/ns/ran.csar"
+ nsd_json = parse_nsd(ran_csar)
+ metadata = json.loads(nsd_json).get("metadata")
+ self.assertEqual("RAN-NS", metadata.get("template_name", ""))
+
def remove_temp_dir(self):
tempdir = tempfile.gettempdir()
for dir in os.listdir(tempdir):