コード例 #1
0
ファイル: user_test.py プロジェクト: johnjohnsp1/grr
  def setUp(self):
    super(ApiDeletePendingUserNotificationHandlerTest, self).setUp()
    self.handler = user_plugin.ApiDeletePendingUserNotificationHandler()
    self.client_id = self.SetupClients(1)[0]

    with test_lib.FakeTime(self.TIME_0):
      self._SendNotification(notification_type="Discovery",
                             subject=str(self.client_id),
                             message="<some message>",
                             client_id=self.client_id)

      self._SendNotification(notification_type="Discovery",
                             subject=str(self.client_id),
                             message="<some message with identical time>",
                             client_id=self.client_id)

    with test_lib.FakeTime(self.TIME_1):
      self._SendNotification(notification_type="ViewObject",
                             subject=str(self.client_id),
                             message="<some other message>",
                             client_id=self.client_id)
コード例 #2
0
 def DeletePendingUserNotification(self, args, token=None):
     return api_user.ApiDeletePendingUserNotificationHandler()