#NEWLINE# def assertInvalidEmail( self , response , field ) : #NEWLINE# #INDENT# self . assertEqual ( response . data , { #NEWLINE# #INDENT# ( '%s' % field ) : [ 'This is an invalid email address.' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( response . status_code , status . HTTP_400_BAD_REQUEST )