'Tests nested stack creation based on props.
Tests that the nested stack that implements the group is created
appropriately based on properties.'

def test_assemble_nested(self):

    stack = utils.parse_stack(template)
    snip = stack.t.resource_definitions(stack)['group1']
    resg = resource_group.ResourceGroup('test', snip, stack)
    templ = {'heat_template_version': '2015-04-30', 'resources': {'0': {'type': 'OverwrittenFnGetRefIdType', 'properties': {'Foo': 'Bar'}}, '1': {'type': 'OverwrittenFnGetRefIdType', 'properties': {'Foo': 'Bar'}}, '2': {'type': 'OverwrittenFnGetRefIdType', 'properties': {'Foo': 'Bar'}}}}
    self.assertEqual(templ, resg._assemble_nested(['0', '1', '2']).t)
