def test_deletion_policy_apply_get_param(self):
    tmpl = template_format.parse('\n        heat_template_version: 2016-04-08\n        parameters:\n          deletion_policy:\n            type: string\n            default: Delete\n        resources:\n          AResource:\n            type: ResourceWithPropsType\n            deletion_policy: {get_param: deletion_policy}\n            properties:\n              Foo: abc\n        ')
    self.stack = stack.Stack(self.ctx, 'stack_delpol_get_param', template.Template(tmpl))
    self.stack.validate()
    self.stack.store()
    self.stack.create()
    self.assertEqual((self.stack.CREATE, self.stack.COMPLETE), self.stack.state)
def test_deletion_policy_apply_get_param(self):
    tmpl = template_format.parse('\n        heat_template_version: 2016-04-08\n        parameters:\n          deletion_policy:\n            type: string\n            default: Delete\n        resources:\n          AResource:\n            type: ResourceWithPropsType\n            deletion_policy: {get_param: deletion_policy}\n            properties:\n              Foo: abc\n        ')
    self.stack = stack.Stack(self.ctx, 'stack_delpol_get_param', template.Template(tmpl))
    self.stack.validate()
    self.stack.store()
    self.stack.create()
    self.assertEqual((self.stack.CREATE, self.stack.COMPLETE), self.stack.state)