#NEWLINE# @ mock . patch ( 'olympia.search.middleware.render' ) #NEWLINE# def test_exceptions_we_catch( self , render_mock ) : #NEWLINE# #INDENT# ESM ( ) . process_exception ( self . request , TransportError ( 400 , 'ES ERROR' ) ) #NEWLINE# render_mock . assert_called_with ( render_mock . request , 'search/down.html' , status = 503 ) #NEWLINE# render_mock . reset_mock ( )