Package expedient :: Package common :: Package tests :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Created on Jun 16, 2010


Author: jnaous

Functions [hide private]
 
test_to_http(url)
return a url with "test" scheme replaced by "http".
source code
 
run_cmd_in_xterm(cmd, pause=False)
Runs a command in a subprocess xterm.
source code
 
run_cmd(cmd, pause=False) source code
 
_run_cmd(cmd, pause=False) source code
 
drop_to_shell(local) source code
 
wait_for_servers(urls, timeout) source code
 
wrap_xmlrpc_call(func, args, kwargs, timeout)
Keep trying the xmlrpc call until a timeout occurs on errors that are not xmlrpclib Faults.
source code
Variables [hide private]
  logger = logging.getLogger("test_utils")
  __package__ = 'expedient.common.tests'
Function Details [hide private]

test_to_http(url)

source code 

return a url with "test" scheme replaced by "http".

Parameters:
  • url - the url to edit
Returns:
A url string

wrap_xmlrpc_call(func, args, kwargs, timeout)

source code 

Keep trying the xmlrpc call until a timeout occurs on errors that are not xmlrpclib Faults.

Parameters:
  • func - the function to call
  • args - list of arguments to pass to call
  • kwargs - dict of keyword args to pass to func
  • timeout - How many seconds to keep trying for.