#NEWLINE# @ mock . patch . object ( Site . objects , 'get_current' ) #NEWLINE# def test_request_password_reset( self , get_current ) : #NEWLINE# #INDENT# get_current . return_value . domain = 'testserver' #NEWLINE# p = ProfileFactory ( ) #NEWLINE# url = reverse ( 'user-request-password-reset' , args = [ p . user . username ] ) #NEWLINE# res = self . client . get ( url ) #NEWLINE# eq_ ( res . status_code , 204 ) #NEWLINE# eq_ ( 1 , len ( mail . outbox ) )