#NEWLINE# def testValidationFailureExceptionMessages( self ) : #NEWLINE# #INDENT# wrongString = 'thisIsWrong' #NEWLINE# objClass = protocol . SearchReadsRequest #NEWLINE# obj = objClass ( ) #NEWLINE# obj . start = wrongString #NEWLINE# jsonDict = obj . toJsonDict ( ) #NEWLINE# instance = exceptions . RequestValidationFailureException ( jsonDict , objClass ) #NEWLINE# self . assertIn ( 'invalid fields:' , instance . message ) #NEWLINE# self . assertIn ( "u'start': u'thisIsWrong'" , instance . message ) #NEWLINE# self . assertEqual ( instance . message . count ( wrongString ) , 2 ) #NEWLINE# objClass = protocol . SearchReadsResponse #NEWLINE# obj = objClass ( ) #NEWLINE# obj . alignments = [ protocol . ReadAlignment ( ) ] #NEWLINE# obj . alignments [ 0 ] . alignment = protocol . LinearAlignment ( ) #NEWLINE# obj . alignments [ 0 ] . alignment . mappingQuality = wrongString #NEWLINE# jsonDict = obj . toJsonDict ( ) #NEWLINE# instance = exceptions . ResponseValidationFailureException ( jsonDict , objClass ) #NEWLINE# self . assertIn ( 'Invalid fields' , instance . message ) #NEWLINE# self . assertEqual ( instance . message . count ( wrongString ) , 2 )