#NEWLINE# def test_bad_request_response_with_custom_error_message( self ) : #NEWLINE# #INDENT# '\n        If a view calls render_bad_request_response when request_json is empty\n        or None, the client should get a 400 error\n        ' #NEWLINE# response = self . client . post ( '/json_custom_bad_request/' , data = self . request_dict ) #NEWLINE# response_json = json . loads ( response . content . decode ( 'utf-8' ) ) #NEWLINE# self . assertEqual ( response . status_code , 400 ) #NEWLINE# self . assertEqual ( self , { #NEWLINE# #INDENT# 'error' : 'you messed up' , #NEWLINE# #UNINDENT# } )