#NEWLINE# def test_send_bad_json( self ) : #NEWLINE# #INDENT# '\n        Make sure that - even if we store invalid JSON in databse, we error out\n        instead of sending invalid data to the user.\n        ' #NEWLINE# doc = example . DictDoc . objects . create ( dict = { #NEWLINE# #INDENT# 'NaN' : float ( 'NaN' ) , #NEWLINE# 'inf' : float ( 'inf' ) , #NEWLINE# '-inf' : float ( '-inf' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRaises ( ValueError , self . app . get , ( '/dict_doc/%s/' % doc . id ) ) #NEWLINE# self . assertRaises ( ValueError , self . app . get , '/dict_doc/' )