'Test translation of resources into internal engine format.'

def test_translate_resources_good(self):

    hot_tpl = template_format.parse('\n                                heat_template_version:    2013-05-23\n                                resources:\n                                        resource1:\n                                                type:    AWS::EC2::Instance\n                                                properties:\n                                                        property1:    value1\n                                                metadata:\n                                                        foo:    bar\n                                                depends_on:    dummy\n                                                deletion_policy:    dummy\n                                                update_policy:\n                                                        foo:    bar\n                                ')
    expected = {'resource1': {'Type': 'AWS::EC2::Instance', 'Properties': {'property1': 'value1'}, 'Metadata': {'foo': 'bar'}, 'DependsOn': 'dummy', 'DeletionPolicy': 'dummy', 'UpdatePolicy': {'foo': 'bar'}}}
    tmpl = template.Template(hot_tpl)
    self.assertEqual(expected, tmpl[tmpl.RESOURCES])
