def DeleteFleetspeakPendingMessages(grr_id: str) -> None: """Deletes fleetspeak messages pending for the given client.""" delete_req = admin_pb2.DeletePendingMessagesRequest() delete_req.client_ids.append(GRRIDToFleetspeakID(grr_id)) fleetspeak_connector.CONN.outgoing.DeletePendingMessages( delete_req, single_try_timeout=WRITE_SINGLE_TRY_TIMEOUT, timeout=WRITE_TOTAL_TIMEOUT)
def DeleteFleetspeakPendingMessages(grr_id: str) -> None: """Deletes fleetspeak messages pending for the given client.""" delete_req = admin_pb2.DeletePendingMessagesRequest() delete_req.client_ids.append(GRRIDToFleetspeakID(grr_id)) fleetspeak_connector.CONN.outgoing.DeletePendingMessages(delete_req)
def testDeletePendingMessages(self): t = FakeStub() s = connector.OutgoingConnection(None, 'test', t) s.DeletePendingMessages(admin_pb2.DeletePendingMessagesRequest()) self.assertTrue(t.delete_done) self.assertFalse(t.delete_errors)