def test_incorrect_deletion_policy(self):
    tmpl = template_format.parse("\n        HeatTemplateFormatVersion: '2012-12-12'\n        Parameters:\n          Deletion_Policy:\n            Type: String\n            Default: [1, 2]\n        Resources:\n          AResource:\n            Type: ResourceWithPropsType\n            DeletionPolicy: {Ref: Deletion_Policy}\n            Properties:\n              Foo: abc\n        ")
    self.stack = stack.Stack(self.ctx, 'stack_bad_delpol', template.Template(tmpl))
    ex = self.assertRaises(exception.StackValidationFailed, self.stack.validate)
    self.assertIn('Invalid deletion policy "[1, 2]"', str(ex))
def test_incorrect_deletion_policy(self):
    tmpl = template_format.parse("\n        HeatTemplateFormatVersion: '2012-12-12'\n        Parameters:\n          Deletion_Policy:\n            Type: String\n            Default: [1, 2]\n        Resources:\n          AResource:\n            Type: ResourceWithPropsType\n            DeletionPolicy: {Ref: Deletion_Policy}\n            Properties:\n              Foo: abc\n        ")
    self.stack = stack.Stack(self.ctx, 'stack_bad_delpol', template.Template(tmpl))
    ex = self.assertRaises(exception.StackValidationFailed, self.stack.validate)
    self.assertIn('Invalid deletion policy "[1, 2]"', str(ex))