def launch_server(app, webapp_factory, kwargs, prefix='GALAXY', config_object=None):
 name = prefix.lower()
 host_env_key = ('%s_TEST_HOST' % prefix)
 port_env_key = ('%s_TEST_PORT' % prefix)
 default_web_host = getattr(config_object, 'default_web_host', DEFAULT_WEB_HOST)
 host = os.environ.get(host_env_key, default_web_host)
 port = os.environ.get(port_env_key, None)
 webapp = webapp_factory(kwargs['global_conf'], app=app, use_translogger=False, static_enabled=True)
 (server, port) = serve_webapp(webapp, host=host, port=port)
 os.environ[host_env_key] = host
 os.environ[port_env_key] = port
 wait_for_http_server(host, port)
 log.info(('Embedded web server for %s started' % name))
 return ServerWrapper(app, server, name, host, port)

def launch_server ( app , webapp_factory , kwargs , prefix = 'GALAXY' , config_object = None ) : name = prefix . lower ( ) host_env_key = ( '%s_TEST_HOST' % prefix ) port_env_key = ( '%s_TEST_PORT' % prefix ) default_web_host = getattr ( config_object , 'default_web_host' , DEFAULT_WEB_HOST ) host = os . environ . get ( host_env_key , default_web_host ) port = os . environ . get ( port_env_key , None ) webapp = webapp_factory ( kwargs [ 'global_conf' ] , app = app , use_translogger = False , static_enabled = True ) ( server , port ) = serve_webapp ( webapp , host = host , port = port ) os . environ [ host_env_key ] = host os . environ [ port_env_key ] = port wait_for_http_server ( host , port ) log . info ( ( 'Embedded web server for %s started' % name ) ) return ServerWrapper ( app , server , name , host , port )
launch a web server for a given app using supplied factory .