#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# self . request = APIRequestFactory ( ) . get ( '/login' ) #NEWLINE# self . enable_messages ( self . request ) #NEWLINE# self . user = UserProfile . objects . create ( email = 'real@yeahoo.com' , fxa_id = '9001' ) #NEWLINE# self . identity = { #NEWLINE# #INDENT# 'email' : 'real@yeahoo.com' , #NEWLINE# 'uid' : '9001' , #NEWLINE# #UNINDENT# } #NEWLINE# patcher = mock . patch ( 'olympia.accounts.views.login' ) #NEWLINE# self . login = patcher . start ( ) #NEWLINE# self . addCleanup ( patcher . stop )