#NEWLINE# def _process_view_with_middleware( middleware_cls , url , view_func ) : #NEWLINE# #INDENT# middleware = middleware_cls ( ) #NEWLINE# request_factory = RequestFactory ( ) #NEWLINE# request = request_factory . get ( url ) #NEWLINE# request . user = AnonymousUser ( ) #NEWLINE# return middleware . process_view ( request , view_func , view_args = ( ) , view_kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )