#NEWLINE# def test_invalid_csrf_method( self ) : #NEWLINE# #INDENT# response = self . client . post ( '/csrf-protect-method' , data = { #NEWLINE# #INDENT# 'name' : 'danny' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( response . status_code == 400 ) #NEWLINE# @ self . csrf . error_handler #NEWLINE# def invalid( reason ) : #NEWLINE# #INDENT# return reason #NEWLINE# #UNINDENT# response = self . client . post ( '/' , data = { #NEWLINE# #INDENT# 'name' : 'danny' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( response . status_code == 200 ) #NEWLINE# assert ( b'token missing' in response . data )