def test_create_bad_attribute(self):
    tmpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'AResource': {'Type': 'GenericResourceType'}, 'BResource': {'Type': 'ResourceWithPropsType', 'Properties': {'Foo': {'Fn::GetAtt': ['AResource', 'Foo']}}}}}
    self.stack = stack.Stack(self.ctx, 'bad_attr_test_stack', template.Template(tmpl), disable_rollback=True)
    self.patchobject(generic_rsrc.ResourceWithProps, '_update_stored_properties', side_effect=exception.InvalidTemplateAttribute(resource='a', key='foo'))
    self.stack.store()
    self.stack.create()
    self.assertEqual((stack.Stack.CREATE, stack.Stack.FAILED), self.stack.state)
    self.assertEqual('Resource CREATE failed: The Referenced Attribute (a foo) is incorrect.', self.stack.status_reason)
def test_create_bad_attribute(self):
    tmpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'AResource': {'Type': 'GenericResourceType'}, 'BResource': {'Type': 'ResourceWithPropsType', 'Properties': {'Foo': {'Fn::GetAtt': ['AResource', 'Foo']}}}}}
    self.stack = stack.Stack(self.ctx, 'bad_attr_test_stack', template.Template(tmpl), disable_rollback=True)
    self.patchobject(generic_rsrc.ResourceWithProps, '_update_stored_properties', side_effect=exception.InvalidTemplateAttribute(resource='a', key='foo'))
    self.stack.store()
    self.stack.create()
    self.assertEqual((stack.Stack.CREATE, stack.Stack.FAILED), self.stack.state)
    self.assertEqual('Resource CREATE failed: The Referenced Attribute (a foo) is incorrect.', self.stack.status_reason)