#NEWLINE# def test_authorization_requires_login( self ) : #NEWLINE# #INDENT# response = self . client . get ( self . auth_url ( ) ) #NEWLINE# self . assertEqual ( 302 , self . status_code ) #NEWLINE# self . assertEqual ( '/login/' , urlparse . urlparse ( response [ 'Location' ] ) . path ) #NEWLINE# self . login ( ) #NEWLINE# response = self . client . get ( self . auth_url ( ) ) #NEWLINE# self . assertEqual ( 302 , response . status_code ) #NEWLINE# self . assertTrue ( ( self . auth_url2 ( ) in response [ 'Location' ] ) )