Support version of tosca_simple_yaml_1_1
[parser.git] / tosca2heat / tosca-parser / toscaparser / tests / test_toscatplvalidation.py
index f7c22ab..a8b1590 100644 (file)
@@ -101,6 +101,7 @@ class ToscaTemplateValidationTest(TestCase):
             _('The template version "tosca_simple_yaml_1_10 in '
               'custom_types/imported_sample.yaml" is invalid. '
               'Valid versions are "tosca_simple_yaml_1_0, '
+              'tosca_simple_yaml_1_1, '
               'tosca_simple_profile_for_nfv_1_0_0".'))
         exception.ExceptionCollector.assertExceptionMessage(
             exception.UnknownFieldError,
@@ -446,6 +447,18 @@ heat-translator/master/translator/tests/data/custom_types/wordpress.yaml
         self.assertTrue(custom_defs.get("mycompany.tosca.nodes."
                                         "WebApplication.WordPress"))
 
+    def test_imports_file_with_suffix_yml(self):
+            tpl_snippet = '''
+            imports:
+              - custom_types/wordpress.yml
+            '''
+            path = 'toscaparser/tests/data/tosca_elk.yaml'
+            custom_defs = self._imports_content_test(tpl_snippet,
+                                                     path,
+                                                     "node_types")
+            self.assertTrue(custom_defs.get("tosca.nodes."
+                                            "WebApplication.WordPress"))
+
     def test_import_error_file_uri(self):
         tpl_snippet = '''
         imports: