#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# request = DummyRequest ( ) #NEWLINE# self . auth = ( 'user' , 'pass' ) #NEWLINE# settings = { #NEWLINE# #INDENT# 'auth.backend_server' : 'server' , #NEWLINE# 'auth.user' : self . auth [ 0 ] , #NEWLINE# 'auth.password' : self . auth [ 1 ] , #NEWLINE# #UNINDENT# } #NEWLINE# kwargs = RemoteAccessBackend . configure ( settings ) #NEWLINE# self . backend = RemoteAccessBackend ( request , ** kwargs ) #NEWLINE# self . requests = MagicMock ( ) #NEWLINE# patch . dict ( 'sys.modules' , requests = self . requests ) . start ( )