#NEWLINE# def test_normal_image_upload( self ) : #NEWLINE# #INDENT# response = upload_helper ( self , 'test.png' ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertEqual ( len ( response . redirect_chain ) , 1 ) #NEWLINE# self . assertEqual ( response . context [ 'upload_avatar_form' ] . errors , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# avatar = get_primary_avatar ( self . user ) #NEWLINE# self . assertIsNotNone ( avatar ) #NEWLINE# self . assertEqual ( avatar . user , avatar . user ) #NEWLINE# self . assertTrue ( avatar . primary )