def test_nodisable_validate_tmpl_err(self):
    tmpl = template_format.parse('\n        heat_template_version: 2013-05-23\n        resources:\n          AResource:\n            type: ResourceWithPropsRefPropOnValidate\n            depends_on: noexist\n            properties:\n              FooInt: 123\n        ')
    self.stack = stack.Stack(self.ctx, 'stack_with_tmpl_err', template.Template(tmpl))
    ex = self.assertRaises(exception.InvalidTemplateReference, self.stack.validate)
    self.assertIn('The specified reference "noexist" (in AResource) is incorrect', str(ex))
    self.stack.strict_validate = False
    ex = self.assertRaises(exception.InvalidTemplateReference, self.stack.validate)
    self.assertIn('The specified reference "noexist" (in AResource) is incorrect', str(ex))
    ex = self.assertRaises(exception.InvalidTemplateReference, self.stack.validate, validate_res_tmpl_only=True)
    self.assertIn('The specified reference "noexist" (in AResource) is incorrect', str(ex))
def test_nodisable_validate_tmpl_err(self):
    tmpl = template_format.parse('\n        heat_template_version: 2013-05-23\n        resources:\n          AResource:\n            type: ResourceWithPropsRefPropOnValidate\n            depends_on: noexist\n            properties:\n              FooInt: 123\n        ')
    self.stack = stack.Stack(self.ctx, 'stack_with_tmpl_err', template.Template(tmpl))
    ex = self.assertRaises(exception.InvalidTemplateReference, self.stack.validate)
    self.assertIn('The specified reference "noexist" (in AResource) is incorrect', str(ex))
    self.stack.strict_validate = False
    ex = self.assertRaises(exception.InvalidTemplateReference, self.stack.validate)
    self.assertIn('The specified reference "noexist" (in AResource) is incorrect', str(ex))
    ex = self.assertRaises(exception.InvalidTemplateReference, self.stack.validate, validate_res_tmpl_only=True)
    self.assertIn('The specified reference "noexist" (in AResource) is incorrect', str(ex))