#NEWLINE# def test_post_with_regular_user_when_information_has_not_changed( self ) : #NEWLINE# #INDENT# '\n        Updating user profile with regular user should not change the\n        information if it has not been changed. It should also show info\n        message.\n        ' #NEWLINE# self . request . method = 'POST' #NEWLINE# self . request . user = UserFactory . create ( ) #NEWLINE# self . request . POST = { #NEWLINE# #INDENT# 'display_name' : self . request . user . display_name , #NEWLINE# 'email' : self . request . user . email , #NEWLINE# #UNINDENT# } #NEWLINE# EmailAddress . objects . create ( user = self . request . user , email = self . request . user . email , verified = True ) #NEWLINE# response = self . view ( self . request ) . render ( ) #NEWLINE# rendered = render_to_string ( 'users/profile.html' , { #NEWLINE# #INDENT# 'GEOKEY_VERSION' : version . get_version ( ) , #NEWLINE# 'PLATFORM_NAME' : get_current_site ( self . request ) . name , #NEWLINE# 'user' : self . request . user , #NEWLINE# 'messages' : get_messages ( self . request ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# response = render_helpers . remove_csrf ( response . content . decode ( 'utf-8' ) ) #NEWLINE# self . assertEqual ( response , rendered ) #NEWLINE# reference = EmailAddress . objects . get ( user = self . request . user ) #NEWLINE# self . assertEqual ( reference . verified , True )