def testAuthentication1(self):
    flow_obj = self.FlowSetup("FlowOrderTest")

    # Simultate processing messages arriving in random order
    message_ids = [2, 1, 4, 3, 5]
    self.SendMessages(message_ids, flow_obj.session_id,
                      authenticated=False)

    # Send the status message
    message = self.SendOKStatus(6, flow_obj.session_id)

    runner = flow_runner.FlowRunner(flow_obj)
    notification = rdf_flows.Notification(
        timestamp=rdfvalue.RDFDatetime().Now())
    runner.ProcessCompletedRequests(notification, [message])

    # Now messages should actually be processed
    self.assertEqual(flow_obj.messages, [])
Test that flows refuse to processes unauthenticated messages.
dataset/ETHPy150Open google/grr/grr/lib/flow_test.py/FlowTest.testAuthentication1