#NEWLINE# def test_redirect_when_already_logged_in( self ) : #NEWLINE# #INDENT# self . _login ( ) #NEWLINE# response = self . client . get ( reverse ( 'login' ) ) #NEWLINE# self . assertEqual ( response . status_code , 302 ) #NEWLINE# self . assertNotIn ( reverse ( 'login' ) , self [ 'location' ] )