#NEWLINE# def test_groups_with_repeated_targets( self ) : #NEWLINE# #INDENT# tpl_snippet = '\n        node_templates:\n          server:\n            type: tosca.nodes.Compute\n            requirements:\n              - log_endpoint:\n                  capability: log_endpoint\n\n          mysql_dbms:\n            type: tosca.nodes.DBMS\n            properties:\n              root_password: aaa\n              port: 3376\n\n        groups:\n          webserver_group:\n            type: tosca.groups.Root\n            members: [ server, server, mysql_dbms ]\n        ' #NEWLINE# tpl = toscaparser . utils . yamlparser . simple_parse ( tpl_snippet ) #NEWLINE# expectedmessage = _ ( '"Member nodes "[\'server\', \'server\', \'mysql_dbms\']" should be >= 1 and not repeated"' ) #NEWLINE# err = self . assertRaises ( exception . InvalidGroupTargetException , TopologyTemplate , self , None ) #NEWLINE# self . assertEqual ( expectedmessage , err . __str__ ( ) )