def testCallClientWellKnown(self):
    cls = flow.GRRFlow.classes["GetClientStatsAuto"]
    flow_obj = cls(cls.well_known_session_id, mode="rw", token=self.token)

    flow_obj.CallClient(self.client_id, "GetClientStats")

    # Check that a message went out to the client
    manager = queue_manager.QueueManager(token=self.token)
    tasks = manager.Query(self.client_id, limit=100)

    self.assertEqual(len(tasks), 1)

    message = tasks[0]

    # If we don't specify where to send the replies, they go to the devnull flow
    devnull = flow.GRRFlow.classes["IgnoreResponses"]
    self.assertEqual(message.session_id, devnull.well_known_session_id)
    self.assertEqual(message.request_id, 0)
    self.assertEqual(message.name, "GetClientStats")

    messages = []

    def StoreMessage(_, msg):
      messages.append(msg)

    with utils.Stubber(devnull, "ProcessMessage", StoreMessage):
      client_mock = action_mocks.ActionMock("GetClientStats")
      for _ in test_lib.TestFlowHelper(
          "ClientActionRunner", client_mock, client_id=self.client_id,
          action="GetClientStats", token=self.token):
        pass

    # Make sure the messages arrived.
    self.assertEqual(len(messages), 1)
Returns the Tree model, set for the project.
dataset/ETHPy150Open google/grr/grr/lib/flow_test.py/FlowTest.testCallClientWellKnown--crossover with--dataset/ETHPy150Open idlesign/django-sitetree/sitetree/utils.py/get_tree_model