def test_preview_resources_returns_list_of_resource_previews(self):
    tmpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'AResource': {'Type': 'GenericResourceType'}}}
    self.stack = stack.Stack(self.ctx, 'preview_stack', template.Template(tmpl))
    res = mock.Mock()
    res.preview.return_value = 'foo'
    self.stack._resources = {'r1': res}
    resources = self.stack.preview_resources()
    self.assertEqual(['foo'], resources)
def test_preview_resources_returns_list_of_resource_previews(self):
    tmpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'AResource': {'Type': 'GenericResourceType'}}}
    self.stack = stack.Stack(self.ctx, 'preview_stack', template.Template(tmpl))
    res = mock.Mock()
    res.preview.return_value = 'foo'
    self.stack._resources = {'r1': res}
    resources = self.stack.preview_resources()
    self.assertEqual(['foo'], resources)