grr/server/grr_response_server/gui/api_regression_test_lib.py
def StartFlow(client_id, flow_cls, flow_args=None, token=None):
  """A test helper function to start a flow."""
  # TODO(amoser): Once AFF4 is removed, this method should be moved to
  # flow_test_lib.
  if data_store.RelationalDBFlowsEnabled():
    return flow.StartFlow(
        creator=token and token.username,
        flow_cls=flow_cls,
        flow_args=flow_args,
        client_id=client_id)
  else:
    return flow.StartAFF4Flow(
        flow_name=compatibility.GetName(flow_cls),
        notify_to_user=True,
        client_id=client_id,
        args=flow_args,
        token=token).Basename()
A test helper function to start a flow.
A test helper function to start a flow.
A test helper function to start a flow .
def StartFlow(client_id, flow_cls, flow_args=None, token=None):
  if data_store.RelationalDBFlowsEnabled():
    return flow.StartFlow(
        creator=token and token.username,
        flow_cls=flow_cls,
        flow_args=flow_args,
        client_id=client_id)
  else:
    return flow.StartAFF4Flow(
        flow_name=compatibility.GetName(flow_cls),
        notify_to_user=True,
        client_id=client_id,
        args=flow_args,
        token=token).Basename()
def StartFlow ( client_id , flow_cls , flow_args = None , token = None ) : if data_store . RelationalDBFlowsEnabled ( ) : return flow . StartFlow ( creator = token and token . username , flow_cls = flow_cls , flow_args = flow_args , client_id = client_id ) else : return flow . StartAFF4Flow ( flow_name = compatibility . GetName ( flow_cls ) , notify_to_user = True , client_id = client_id , args = flow_args , token = token ) . Basename ( )
A test helper function to start a flow.
A test helper function to start a flow .
"""A test helper function to start a flow.""" # TODO(amoser): Once AFF4 is removed, this method should be moved to # flow_test_lib.
client_id
flow_cls
flow_args
token