Exemplo n.º 1
0
    def run(self):
        """Trigger notifications for websites"""
        sitelist = self.get_notify_sites()

        for site in sitelist:
            LOGGER.info ("Sending notifations for %s.", site)
            SendWeeklyReport.delay(site)
 def test_get_notify_list(self):
     """Test checks to insure that Thingles is a subscriber of WikiApiary."""
     task = SendWeeklyReport()
     userlist = task.get_notify_list('WikiApiary')
     if 'Thingles' not in userlist:
         raise Exception(
             'Thingles not found as a subscriber for WikiApiary.')
    def run(self):
        """Trigger notifications for websites"""
        sitelist = self.get_notify_sites()

        for site in sitelist:
            LOGGER.info("Sending notifations for %s.", site)
            SendWeeklyReport.delay(site)
 def test_send_notification(self):
     """Send a test notification to Thingles."""
     test_site = 'WikiApiary'
     task = SendWeeklyReport()
     message_body = task.generate_weekly_report(test_site)
     task.send_notification('Thingles',
                            "[Unittest] Weekly Report for %s" % test_site,
                            message_body)
 def test_send_notification(self):
     """Send a test notification to Thingles."""
     test_site = 'WikiApiary'
     task = SendWeeklyReport()
     message_body = task.generate_weekly_report(test_site)
     task.send_notification(
         'Thingles',
         "[Unittest] Weekly Report for %s" % test_site,
         message_body
     )
 def test_get_notify_list_nosite(self):
     """Test checks to insure that Thingles is a subscriber of WikiApiary."""
     task = SendWeeklyReport()
     userlist = task.get_notify_list('There is no website named this')
     assert len(userlist) == 0
 def test_get_notify_list_nosite(self):
     """Test checks to insure that Thingles is a subscriber of WikiApiary."""
     task = SendWeeklyReport()
     userlist = task.get_notify_list('There is no website named this')
     assert len(userlist) == 0
 def test_get_notify_list(self):
     """Test checks to insure that Thingles is a subscriber of WikiApiary."""
     task = SendWeeklyReport()
     userlist = task.get_notify_list('WikiApiary')
     if 'Thingles' not in userlist:
         raise Exception('Thingles not found as a subscriber for WikiApiary.')