'Test get resources with invalid key.'

def test_get_resources_no_type(self):

    t = template_format.parse('\n                                                AWSTemplateFormatVersion:    2010-09-09\n                                                Resources:\n                                                        resource1:\n                                                                Properties:\n                                                                        property1:    value1\n                                                                Metadata:\n                                                                        foo:    bar\n                                                                DependsOn:    dummy\n                                                                DeletionPolicy:    dummy\n                                                                UpdatePolicy:\n                                                                        foo:    bar\n                                ')
    tmpl = template.Template(t)
    error = self.assertRaises(exception.StackValidationFailed, tmpl.validate)
    self.assertEqual('Each    Resource    must    contain    a    Type    key.', six.text_type(error))
