#NEWLINE# def test_json_or_error_returns( self ) : #NEWLINE# #INDENT# '\n        JsonApiRequest.json_or_error should return a status code and JSON on success\n        ' #NEWLINE# with response_context ( ) as response_mock : #NEWLINE# #INDENT# data = JsonApiRequest . json_or_error ( response_mock ) #NEWLINE# self . assertEqual ( response_mock , { #NEWLINE# #INDENT# 'spam' : True , #NEWLINE# #UNINDENT# } )