X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tosca2heat%2Ftosca-parser%2Ftoscaparser%2Ftests%2Ftest_toscatpl.py;h=fd8ee90dc44afb48796cb16b939a08e5d947a5ea;hb=f416d7ba961edddfd956b556ed6566bf48824bf5;hp=af35cfb2580e7a7f160d28739341f89b95dc2531;hpb=859e2826074aa51e0334d4607ccfcde5972e882e;p=parser.git diff --git a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py index af35cfb..fd8ee90 100644 --- a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py +++ b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py @@ -216,6 +216,10 @@ class ToscaTemplateTest(TestCase): tosca_tpl = self._load_template('test_no_outputs_in_template.yaml') self.assertEqual(0, len(tosca_tpl.outputs)) + def test_template_file_with_suffix_yml(self): + tosca_tpl = self._load_template('custom_types/wordpress.yml') + self.assertIsNotNone(tosca_tpl) + def test_relationship_interface(self): template = ToscaTemplate(self.tosca_elk_tpl) for node_tpl in template.nodetemplates: @@ -662,6 +666,17 @@ class ToscaTemplateTest(TestCase): self.assertEqual(tosca.version, "tosca_simple_yaml_1_0") + def test_yaml_dict_tpl_with_version_1_1(self): + test_tpl = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "data/tosca_helloworld_with_version_1_1.yaml") + + yaml_dict_tpl = toscaparser.utils.yamlparser.load_yaml(test_tpl) + + tosca = ToscaTemplate(yaml_dict_tpl=yaml_dict_tpl) + + self.assertEqual(tosca.version, "tosca_simple_yaml_1_1") + def test_yaml_dict_tpl_with_params_and_url_import(self): test_tpl = os.path.join( os.path.dirname(os.path.abspath(__file__)),