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

def test_assemble_nested(self):

    stack = utils.parse_stack(self.template)
    snip = stack.t.resource_definitions(stack)['deploy_mysql']
    resg = sd.SoftwareDeploymentGroup('test', snip, stack)
    templ = {'heat_template_version': '2015-04-30', 'resources': {'server1': {'type': 'OS::Heat::SoftwareDeployment', 'properties': {'server': 'uuid1', 'actions': ['CREATE', 'UPDATE'], 'config': 'config_uuid', 'input_values': {'foo': 'bar'}, 'name': '10_config', 'signal_transport': 'CFN_SIGNAL'}}, 'server2': {'type': 'OS::Heat::SoftwareDeployment', 'properties': {'server': 'uuid2', 'actions': ['CREATE', 'UPDATE'], 'config': 'config_uuid', 'input_values': {'foo': 'bar'}, 'name': '10_config', 'signal_transport': 'CFN_SIGNAL'}}}}
    self.assertEqual(templ, resg._assemble_nested(['server1', 'server2']).t)
