#NEWLINE# def assertRedirected( self , response , expected_url , status_code = 302 ) : #NEWLINE# #INDENT# self . assertEqual ( response . status_code , status_code ) #NEWLINE# self . assertEqual ( response . _headers [ 'location' ] [ 1 ] , ( 'http://testserver%s' % expected_url ) )