#NEWLINE# def assertRedirects( self , response , url ) : #NEWLINE# #INDENT# "\n        reimplement this in case it's a WebOp response\n        and it seems to be screwing up in a few places too\n        thus the localhost exception\n        " #NEWLINE# if hasattr ( response , 'location' ) : #NEWLINE# #INDENT# assert ( url in response . location ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( url in response . _headers [ 'location' ] [ 1 ] ) #NEWLINE# #UNINDENT# if hasattr ( response , 'status_code' ) : #NEWLINE# #INDENT# assert ( response . status_code == 302 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( response . status_int == 302 )