def test_deletion_policy_apply_ref(self):
    tmpl = template_format.parse("\n        HeatTemplateFormatVersion: '2012-12-12'\n        Parameters:\n          Deletion_Policy:\n            Type: String\n            Default: Delete\n        Resources:\n          AResource:\n            Type: ResourceWithPropsType\n            DeletionPolicy: wibble\n            Properties:\n              Foo: abc\n            DeletionPolicy: {Ref: Deletion_Policy}\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_ref(self):
    tmpl = template_format.parse("\n        HeatTemplateFormatVersion: '2012-12-12'\n        Parameters:\n          Deletion_Policy:\n            Type: String\n            Default: Delete\n        Resources:\n          AResource:\n            Type: ResourceWithPropsType\n            DeletionPolicy: wibble\n            Properties:\n              Foo: abc\n            DeletionPolicy: {Ref: Deletion_Policy}\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)