#NEWLINE# def test_disallow_blank_with_trim_whitespace( self ) : #NEWLINE# #INDENT# field = serializers . CharField ( allow_blank = False , trim_whitespace = True ) #NEWLINE# with pytest . raises ( serializers . ValidationError ) as exc_info : #NEWLINE# #INDENT# field . run_validation ( '   ' ) #NEWLINE# #UNINDENT# assert ( self . value . detail == [ 'This field may not be blank.' ] )