#NEWLINE# def assert_redirect( self , path , code , location ) : #NEWLINE# #INDENT# resp = self . app . get ( path ) #NEWLINE# self . assertEqual ( resp . status_code , code ) #NEWLINE# gotloc = urlparse . urlsplit ( dict ( resp . headers ) [ 'Location' ] ) . path #NEWLINE# self . assertEqual ( gotloc , location )