'Test resolution of get_attr occurrences in HOT template.'

def test_get_attr_invalid_resource(self):

    hot_tpl = hot_tpl_complex_attrs
    self.stack = parser.Stack(self.ctx, 'test_get_attr_invalid_none', template.Template(hot_tpl))
    self.stack.store()
    self.stack.create()
    self.assertEqual((parser.Stack.CREATE, parser.Stack.COMPLETE), self.stack.state)
    snippet = {'Value': {'get_attr': ['resource2', 'who_cares']}}
    self.assertRaises(exception.InvalidTemplateReference, self.resolve, snippet)
