# 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
from catalog.pub.utils.toscaparser import parse_vnfd
-class TestNsPackage(TestCase):
+class TestToscaparser(TestCase):
def setUp(self):
pass
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", ""))
{[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