#NEWLINE# def test_relationship_template_properties( self ) : #NEWLINE# #INDENT# tpl_snippet = '\n        relationship_templates:\n            storage_attachto:\n                type: AttachesTo\n                properties:\n                  device: test_device\n        ' #NEWLINE# expectedmessage = _ ( '"properties" of template "storage_attachto" is missing required field "[\'location\']".' ) #NEWLINE# rel_template = toscaparser . utils . yamlparser . simple_parse ( rel_template ) [ 'relationship_templates' ] #NEWLINE# name = list ( rel_template . keys ( ) ) [ 0 ] #NEWLINE# rel_template = RelationshipTemplate ( rel_template [ name ] , name ) #NEWLINE# err = self . assertRaises ( exception . MissingRequiredFieldError , rel_template . validate ) #NEWLINE# self . assertEqual ( expectedmessage , six . text_type ( err ) )