def test_prop_validate_value(self):
    tmpl = template_format.parse("\n        HeatTemplateFormatVersion: '2012-12-12'\n        Resources:\n          AResource:\n            Type: ResourceWithPropsType\n            Properties:\n              FooInt: notanint\n        ")
    self.stack = stack.Stack(self.ctx, 'stack_with_bad_property', template.Template(tmpl))
    ex = self.assertRaises(exception.StackValidationFailed, self.stack.validate)
    self.assertIn("'notanint' is not an integer", str(ex))
    self.stack.strict_validate = False
    self.assertIsNone(self.stack.validate())
def test_prop_validate_value(self):
    tmpl = template_format.parse("\n        HeatTemplateFormatVersion: '2012-12-12'\n        Resources:\n          AResource:\n            Type: ResourceWithPropsType\n            Properties:\n              FooInt: notanint\n        ")
    self.stack = stack.Stack(self.ctx, 'stack_with_bad_property', template.Template(tmpl))
    ex = self.assertRaises(exception.StackValidationFailed, self.stack.validate)
    self.assertIn("'notanint' is not an integer", str(ex))
    self.stack.strict_validate = False
    self.assertIsNone(self.stack.validate())