#NEWLINE# def test_validate_level_message_should_be_list( self ) : #NEWLINE# #INDENT# for level in [ 'info' , 'error' , 'warn' ] : #NEWLINE# #INDENT# result = server_plugins . Result ( ) #NEWLINE# result . result = copy . deepcopy ( self . result_to_validate ) #NEWLINE# result . result [ 'messages' ] [ level ] = str ( ) #NEWLINE# with pytest . raises ( smoker_exceptions . ValidationError ) as exc_info : #NEWLINE# #INDENT# result . validate ( ) #NEWLINE# #UNINDENT# expected = ( "Can't validate message: Result message type %s has to be a list, not str" % level ) #NEWLINE# assert ( expected in expected . value )