grr/server/grr_response_server/gui/api_regression_test_lib.py
def GetFlowTestReplaceDict(client_id=None,
                           flow_id=None,
                           replacement_flow_id="W:ABCDEF"):
  """Creates and returns a replacement dict for flow regression tests."""
  replace = {}
  if data_store.RelationalDBFlowsEnabled():
    if client_id and flow_id:
      # New style session ids need to be converted.
      old_style_id = "%s/%s" % (client_id, flow_id)
      new_style_id = "%s/flows/%s" % (client_id, replacement_flow_id)
      replace[old_style_id] = new_style_id

  if flow_id:
    replace[flow_id] = replacement_flow_id

  return replace
Creates and returns a replacement dict for flow regression tests.
Creates and returns a replacement dict for flow regression tests.
Creates and returns a replacement dict for flow regression tests .
def GetFlowTestReplaceDict(client_id=None,
                           flow_id=None,
                           replacement_flow_id="W:ABCDEF"):
  replace = {}
  if data_store.RelationalDBFlowsEnabled():
    if client_id and flow_id:
      old_style_id = "%s/%s" % (client_id, flow_id)
      new_style_id = "%s/flows/%s" % (client_id, replacement_flow_id)
      replace[old_style_id] = new_style_id
  if flow_id:
    replace[flow_id] = replacement_flow_id
  return replace
def GetFlowTestReplaceDict ( client_id = None , flow_id = None , replacement_flow_id = "W:ABCDEF" ) : replace = { } if data_store . RelationalDBFlowsEnabled ( ) : if client_id and flow_id : old_style_id = "%s/%s" % ( client_id , flow_id ) new_style_id = "%s/flows/%s" % ( client_id , replacement_flow_id ) replace [ old_style_id ] = new_style_id if flow_id : replace [ flow_id ] = replacement_flow_id return replace
Creates and returns a replacement dict for flow regression tests.
Creates and returns a replacement dict for flow regression tests .
"""Creates and returns a replacement dict for flow regression tests.""" # New style session ids need to be converted.
client_id
flow_id
replacement_flow_id