#NEWLINE# def _get_middleware( self , app_config = None ) : #NEWLINE# #INDENT# from flaskext.gae_mini_profiler import GAEMiniProfilerWSGIMiddleware #NEWLINE# with mock . patch ( 'flaskext.gae_mini_profiler.profiler' ) : #NEWLINE# #INDENT# app = mock . MagicMock ( name = 'app' ) #NEWLINE# if app_config : #NEWLINE# #INDENT# app . config = app_config #NEWLINE# #UNINDENT# wsgi_app = mock . Mock ( name = 'wsgi_app' ) #NEWLINE# return GAEMiniProfilerWSGIMiddleware ( app , wsgi_app )