#NEWLINE# def test_profile_exists_with_user( self ) : #NEWLINE# #INDENT# identity = { #NEWLINE# #INDENT# 'uid' : '1234' , #NEWLINE# 'email' : 'hey@yo.it' , #NEWLINE# #UNINDENT# } #NEWLINE# self . fxa_identify . return_value = identity #NEWLINE# self . find_user . return_value = self . user #NEWLINE# self . user . is_authenticated = ( lambda : False ) #NEWLINE# self . request . data = { #NEWLINE# #INDENT# 'code' : 'foo' , #NEWLINE# 'state' : 'some-blob' , #NEWLINE# #UNINDENT# } #NEWLINE# ( args , kwargs ) = self . fn ( self . request ) #NEWLINE# assert ( args == ( self , self . request ) ) #NEWLINE# assert ( kwargs == { #NEWLINE# #INDENT# 'user' : self . user , #NEWLINE# 'identity' : identity , #NEWLINE# 'next_path' : None , #NEWLINE# #UNINDENT# } )