#NEWLINE# def test_batch_with_invalid_command_causes_invalid_request_error( self ) : #NEWLINE# #INDENT# request = [ 1 ] #NEWLINE# response = self . jrw . handle_data ( request ) #NEWLINE# self . assertEqual ( len ( response ) , 1 ) #NEWLINE# response = response [ 0 ] #NEWLINE# self . assertIsNone ( response [ 'id' ] ) #NEWLINE# error = response [ 'error' ] #NEWLINE# self . assertEqual ( error [ 'code' ] , ( - 32600 ) ) #NEWLINE# self . assertEqual ( error [ 'message' ] , 'Invalid Request' ) #NEWLINE# self . assertEqual ( error [ 'data' ] , 'Request must be an object' )