#NEWLINE# def _fix_testproxy_port( self ) : #NEWLINE# #INDENT# filename = os . path . join ( self . proxy_profiles_path , 'test.ini' ) #NEWLINE# with open ( filename , 'rb' ) as f : #NEWLINE# #INDENT# data = f . read ( ) . decode ( 'utf-8' ) #NEWLINE# #UNINDENT# data = data . replace ( '8990' , str ( self . mock_proxy_port ) ) #NEWLINE# with open ( filename , 'wb' ) as f : #NEWLINE# #INDENT# f . write ( data . encode ( 'utf-8' ) )