diff options
author | shangxdy <shang.xiaodong@zte.com.cn> | 2016-06-14 17:31:14 +0800 |
---|---|---|
committer | shangxdy <shang.xiaodong@zte.com.cn> | 2016-06-15 00:41:56 +0800 |
commit | dc0e2e51304dbc085546ee869617d9c545610667 (patch) | |
tree | f0e4bfab08eff9f15b3b9abad7f3273485c7532d /tosca2heat/tosca-parser/toscaparser/tests | |
parent | 37c637988622dde3425390fb861800ffdaf2b6cb (diff) |
The policytype's parent_type definition is error
1. policy type define parent_type, but it shall be statefulentity, not string,
so the method of is_derived_from in policy entity may be error
when it's called.
2. The bug will submit to openstack community.
Change-Id: I25e1cb04e9c13eea6d47ed0bfeac961f59146842
JIRA: PARSER-52
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tests')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/tests/test_toscadef.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/test_toscadef.py b/tosca2heat/tosca-parser/toscaparser/tests/test_toscadef.py index f0a87ac..104fab3 100644 --- a/tosca2heat/tosca-parser/toscaparser/tests/test_toscadef.py +++ b/tosca2heat/tosca-parser/toscaparser/tests/test_toscadef.py @@ -282,8 +282,9 @@ class ToscaDefTest(TestCase): key=lambda x: str(x))) def test_policies(self): + self.assertEqual(policy_root_type.parent_type, None) self.assertEqual('tosca.policies.Root', - policy_placement_type.parent_type) + policy_placement_type.parent_type.type) self.assertEqual({}, policy_placement_type.parent_policies) self.assertEqual(sorted(['tosca.policies.Root', 'The TOSCA Policy Type definition that is ' @@ -295,7 +296,7 @@ class ToscaDefTest(TestCase): key=lambda x: str(x))) self.assertEqual('tosca.policies.Root', - policy_scaling_type.parent_type) + policy_scaling_type.parent_type.type) self.assertEqual({}, policy_scaling_type.parent_policies) self.assertEqual(sorted(['tosca.policies.Root', 'The TOSCA Policy Type definition that is ' @@ -307,7 +308,7 @@ class ToscaDefTest(TestCase): key=lambda x: str(x))) self.assertEqual('tosca.policies.Root', - policy_update_type.parent_type) + policy_update_type.parent_type.type) self.assertEqual({}, policy_update_type.parent_policies) self.assertEqual(sorted(['tosca.policies.Root', 'The TOSCA Policy Type definition that is ' @@ -319,7 +320,7 @@ class ToscaDefTest(TestCase): key=lambda x: str(x))) self.assertEqual('tosca.policies.Root', - policy_performance_type.parent_type) + policy_performance_type.parent_type.type) self.assertEqual({}, policy_performance_type.parent_policies) self.assertEqual(sorted(['tosca.policies.Root', 'The TOSCA Policy Type definition that is ' |