def test_resource_get(self):
    tpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'A': {'Type': 'GenericResourceType'}}}
    self.stack = stack.Stack(self.ctx, 'test_stack', template.Template(tpl), status_reason='blarg')
    self.stack.store()
    self.assertEqual('A', self.stack.resource_get('A').name)
    self.assertEqual(self.stack['A'], self.stack.resource_get('A'))
    self.assertIsNone(self.stack.resource_get('B'))
def test_resource_get(self):
    tpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'A': {'Type': 'GenericResourceType'}}}
    self.stack = stack.Stack(self.ctx, 'test_stack', template.Template(tpl), status_reason='blarg')
    self.stack.store()
    self.assertEqual('A', self.stack.resource_get('A').name)
    self.assertEqual(self.stack['A'], self.stack.resource_get('A'))
    self.assertIsNone(self.stack.resource_get('B'))