diff options
author | Zane Bitter <zbitter@redhat.com> | 2016-09-09 16:14:16 -0400 |
---|---|---|
committer | Zane Bitter <zbitter@redhat.com> | 2016-09-09 16:14:16 -0400 |
commit | 7de1c141dbb3fd46de2ba69c466e60466dc19708 (patch) | |
tree | 47816d820ab2fee507a54360b8593dd0c88b0982 /heat/tests/test_template.py | |
parent | e417fc3b86e6371def4cd4b24480c6c44c2598fc (diff) | |
download | heat-7de1c141dbb3fd46de2ba69c466e60466dc19708.tar.gz |
Handle outputs with an OutputDefinition class
This is the last remaining area of the code where we were slinging around
CloudFormation-formatted snippets of template. Replace it with a proper API
along the lines of ResourceDefinition.
The default implementation of the new template.Template.outputs() method is
equivalent to what we have previously done spread throughout the code, so
that third-party Template plugins will not be affected until they have had
time to write their own custom implementations.
Change-Id: Ib65dad6db55ae5dafab473bebba67e841ca9a984
Diffstat (limited to 'heat/tests/test_template.py')
-rw-r--r-- | heat/tests/test_template.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/heat/tests/test_template.py b/heat/tests/test_template.py index 46e243b8d..4965b3fe7 100644 --- a/heat/tests/test_template.py +++ b/heat/tests/test_template.py @@ -387,18 +387,16 @@ class TestTemplateConditionParser(common.HeatTestCase): self.tmpl) # test condition name is invalid - stk.outputs['foo']['condition'] = 'invalid_cd' + self.tmpl.t['outputs']['foo']['condition'] = 'invalid_cd' ex = self.assertRaises(exception.InvalidConditionReference, - self.tmpl.parse_outputs_conditions, - stk.outputs, stk) + lambda: stk.outputs) self.assertIn('Invalid condition "invalid_cd" ' '(in outputs.foo.condition)', six.text_type(ex)) # test condition name is not string - stk.outputs['foo']['condition'] = 222 + self.tmpl.t['outputs']['foo']['condition'] = 222 ex = self.assertRaises(exception.InvalidConditionReference, - self.tmpl.parse_outputs_conditions, - stk.outputs, stk) + lambda: stk.outputs) self.assertIn('Invalid condition "222" (in outputs.foo.condition)', six.text_type(ex)) |