'Test list_join on a ResourceGroup\'s inner attributes
This should not fail during validation (i.e. before the ResourceGroup
can return the list of the runtime values.'

def test_resource_group_list_join(self):

    hot_tpl = template_format.parse('\n                                heat_template_version:    2014-10-16\n                                resources:\n                                        rg:\n                                                type:    OS::Heat::ResourceGroup\n                                                properties:\n                                                        count:    3\n                                                        resource_def:\n                                                                type:    OS::Nova::Server\n                                ')
    tmpl = template.Template(hot_tpl)
    stack = parser.Stack(utils.dummy_context(), 'test_stack', tmpl)
    snippet = {'list_join': ['\n', {'get_attr': ['rg', 'name']}]}
    self.assertEqual('', self.resolve(snippet, tmpl, stack))
    hot_tpl['heat_template_version'] = '2015-10-15'
    tmpl = template.Template(hot_tpl)
    stack = parser.Stack(utils.dummy_context(), 'test_stack', tmpl)
    snippet = {'list_join': ['\n', {'get_attr': ['rg', 'name']}]}
    self.assertEqual('', self.resolve(snippet, tmpl, stack))
    snippet = {'list_join': ['\n', {'get_attr': ['rg', 'name']}, {'get_attr': ['rg', 'name']}]}
    self.assertEqual('', self.resolve(snippet, tmpl, stack))
