From 726292f65a8e7df9eb7faa4614d77a049218f665 Mon Sep 17 00:00:00 2001 From: shangxdy Date: Tue, 29 Aug 2017 15:01:35 +0800 Subject: Add import file with suffix of yml testcases Add import file with suffix of yml testcases: 1.normal file with suffix of yml; 2.import file with suffix of yml. JIRA: PARSER-144 Change-Id: I24368f7248e782df2e57202a3129c677e1bf068f Signed-off-by: shangxdy --- .../toscaparser/tests/test_toscatplvalidation.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tosca2heat/tosca-parser/toscaparser/tests/test_toscatplvalidation.py') diff --git a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatplvalidation.py b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatplvalidation.py index f7c22ab..2048a83 100644 --- a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatplvalidation.py +++ b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatplvalidation.py @@ -446,6 +446,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: -- cgit 1.2.3-korg