#NEWLINE# def __init__( self , logfile = None ) : #NEWLINE# #INDENT# self . logfile = logfile #NEWLINE# self . tmp_folder = tempfile . mkdtemp ( 'splash-tests-tmp' ) #NEWLINE# self . proxy_profiles_path = self . _copy_test_folder ( 'proxy_profiles' ) #NEWLINE# self . js_profiles_path = self . _copy_test_folder ( 'js_profiles' ) #NEWLINE# self . filters_path = self . _copy_test_folder ( 'filters' ) #NEWLINE# self . lua_modules = self . _copy_test_folder ( 'lua_modules' ) #NEWLINE# self . lua_sandbox_allowed_modules = [ 'emulation' , 'utils' , 'utils_patch' , 'non_existing' ] #NEWLINE# self . mock_http_port = get_ephemeral_port ( ) #NEWLINE# self . mock_https_port = get_ephemeral_port ( ) #NEWLINE# self . mock_proxy_port = get_ephemeral_port ( ) #NEWLINE# self . mock_auth_proxy_port = get_ephemeral_port ( ) #NEWLINE# self . mock_auth_proxy_user = '' . join ( ( random . choice ( string . ascii_letters ) for _ in range ( 20 ) ) ) #NEWLINE# print ( ( 'TestServers mock ports: %s http, %s https, %s proxy %s proxy with auth' % ( self . mock_http_port , self . mock_https_port , self . mock_proxy_port , _ . mock_auth_proxy_port ) ) ) #NEWLINE# self . _fix_testproxy_port ( )