aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog/pub/utils/toscaparser/tests.py6
-rw-r--r--tox.ini2
2 files changed, 5 insertions, 3 deletions
diff --git a/catalog/pub/utils/toscaparser/tests.py b/catalog/pub/utils/toscaparser/tests.py
index a37ce686..bbf7e0da 100644
--- a/catalog/pub/utils/toscaparser/tests.py
+++ b/catalog/pub/utils/toscaparser/tests.py
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+import json
import os
from django.test import TestCase
@@ -18,7 +19,7 @@ from django.test import TestCase
from catalog.pub.utils.toscaparser import parse_vnfd
-class TestNsPackage(TestCase):
+class TestToscaparser(TestCase):
def setUp(self):
pass
@@ -29,4 +30,5 @@ class TestNsPackage(TestCase):
csar_path = os.path.dirname(os.path.abspath(__file__)) + "/testdata/resource-ZteMmeFixVl-csar.csar"
input_parameters = [{"value": "111111", "key": "sdncontroller"}]
vnfd_json = parse_vnfd(csar_path, input_parameters)
- print vnfd_json
+ metadata = json.loads(vnfd_json).get("metadata")
+ self.assertEqual("ZTE-MME-FIX-VL", metadata.get("name", ""))
diff --git a/tox.ini b/tox.ini
index 7facc7ce..65fbc960 100644
--- a/tox.ini
+++ b/tox.ini
@@ -22,4 +22,4 @@ commands =
{[testenv]commands}
[testenv:cov]
-commands = coverage html --omit="*test_*,*__init__.py,*site-packages*" -d htmlcov
+commands = coverage html --omit="*test*,*__init__.py,*site-packages*" -d htmlcov