#NEWLINE# def test_with_image( self ) : #NEWLINE# #INDENT# "Make sure the user's image gets set when it is provided." #NEWLINE# data = { #NEWLINE# #INDENT# 'image' : get_in_memory_image_file ( ) , #NEWLINE# 'timezone' : 'US/Central' , #NEWLINE# 'group_notification_period' : 'none' , #NEWLINE# 'email' : self . user . email , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( reverse ( 'update_user' , args = ( self . user . uuid , ) ) , data ) #NEWLINE# self . assertRedirects ( user , reverse ( 'user_profile' ) , target_status_code = 302 ) #NEWLINE# user = User . objects . get ( pk = self . user . pk ) #NEWLINE# data [ 'image' ] . seek ( 0 ) #NEWLINE# self . assertEqual ( user . image . image . read ( ) , data [ 'image' ] . read ( ) )