#NEWLINE# def fake_urlopen( self , url ) : #NEWLINE# #INDENT# 'Fake urlopen using client if domain\n        correspond to current_site else HTTPError' #NEWLINE# ( scheme , netloc , path , query , fragment ) = urlsplit ( url ) #NEWLINE# if ( not netloc ) : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# if ( self . site . domain == netloc ) : #NEWLINE# #INDENT# response = six . BytesIO ( self . client . get ( url ) . content ) #NEWLINE# return response #NEWLINE# #UNINDENT# raise HTTPError ( self , 404 , 'unavailable url' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , None )