Ejemplo n.º 1
0
  def setUp(self):
    super(ApiDeletePendingGlobalNotificationHandlerTest, self).setUp()
    self.handler = user_plugin.ApiDeletePendingGlobalNotificationHandler()

    with aff4.FACTORY.Create(aff4_users.GlobalNotificationStorage.DEFAULT_PATH,
                             aff4_type=aff4_users.GlobalNotificationStorage,
                             mode="rw",
                             token=self.token) as storage:
      storage.AddNotification(aff4_users.GlobalNotification(
          type=aff4_users.GlobalNotification.Type.ERROR,
          header="Oh no, we're doomed!",
          content="Houston, Houston, we have a prob...",
          link="http://www.google.com"))
      storage.AddNotification(aff4_users.GlobalNotification(
          type=aff4_users.GlobalNotification.Type.INFO,
          header="Nothing to worry about!",
          link="http://www.google.com"))
Ejemplo n.º 2
0
 def DeletePendingGlobalNotification(self, args, token=None):
     return api_user.ApiDeletePendingGlobalNotificationHandler()