#NEWLINE# def assertFailsValidation( self , clean , failed_fields ) : #NEWLINE# #INDENT# with self . assertRaises ( ValidationError ) as cm : #NEWLINE# #INDENT# clean ( ) #NEWLINE# #UNINDENT# self . assertEqual ( sorted ( failed_fields ) , sorted ( self . exception . message_dict ) )