#NEWLINE# def test_context_contains_user( self ) : #NEWLINE# #INDENT# "Test that when a user exists the context has that user's account" #NEWLINE# user = mommy . make ( 'accounts.User' , email = 'random_email@example.com' ) #NEWLINE# self . request . GET = { #NEWLINE# #INDENT# 'email' : self . email , #NEWLINE# 'code' : user . private_hash , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . view ( self . request ) #NEWLINE# self . assertEqual ( response . context_data [ 'email' ] , user . email ) #NEWLINE# self . assertEqual ( response . context_data [ 'account' ] , user )