diff options
author | julien zhang <zhang.jun3g@zte.com.cn> | 2016-06-30 16:25:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-06-30 16:25:55 +0000 |
commit | f5be8f9bf36a27ed0b8e9beaa63bc0a361e2f77b (patch) | |
tree | c64099ea2ea43c24fe0d25e296f4d125344f4114 /tosca2heat/tosca-parser/toscaparser/tests | |
parent | 467b0d29ca83943cc028d776a7cd97522a99644a (diff) | |
parent | 9c1920c1d2b8946abb68b109597d181a7690bc9f (diff) |
Merge "The relationship type's parent_type definition is not complete"
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tests')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py index 3fd49bf..564f4cd 100644 --- a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py +++ b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py @@ -211,6 +211,10 @@ class ToscaTemplateTest(TestCase): for key in relation.keys(): rel_tpl = relation.get(key).get_relationship_template() if rel_tpl: + self.assertEqual( + rel_tpl[0].type, "tosca.relationships.ConnectsTo") + self.assertTrue(rel_tpl[0].is_derived_from( + "tosca.relationships.Root")) interfaces = rel_tpl[0].interfaces for interface in interfaces: self.assertEqual(config_interface, @@ -728,5 +732,7 @@ class ToscaTemplateTest(TestCase): "data/test_tosca_custom_rel_with_script.yaml") tosca = ToscaTemplate(tosca_tpl) rel = tosca.relationship_templates[0] + self.assertEqual(rel.type, "tosca.relationships.HostedOn") + self.assertTrue(rel.is_derived_from("tosca.relationships.Root")) self.assertEqual(len(rel.interfaces), 1) self.assertEqual(rel.interfaces[0].type, "Configure") |