#NEWLINE# def test_invalid_json_returns_400( self ) : #NEWLINE# #INDENT# invalid_json = "'{" #NEWLINE# headers = { #NEWLINE# #INDENT# 'content-type' : 'application/json; charset=UTF-8' , #NEWLINE# #UNINDENT# } #NEWLINE# resp = self . post ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , payload = invalid_json , headers = headers ) #NEWLINE# data = self . assertJsonError ( resp , 400 , 'BadOption' ) #NEWLINE# self . assertEqual ( data [ 'info' ] [ 'type' ] , 'invalid_json' )