Exemple #1
0
 def _notify_fields(self, event):
     fields = getattr(self, "on_%s_notification_fields" % event)
     if not fields:
         return
     payload = self._notification_payload(fields)
     event_with_model_name = event + " " + self.__class__.__name__
     notifier.notifier().info(event_with_model_name, payload)
    def setUp(self):
        super(TestQueueNotifier, self).setUp()

        with unit.StubConfig(notifier="queue"):
            self.notifier = notifier.notifier()
Exemple #3
0
 def setUp(self):
     super(TestLoggingNotifier, self).setUp()
     with unit.StubConfig(notifier="logging"):
         self.notifier = notifier.notifier()
     self.logger = logging.getLogger('melange.notifier.logging_notifier')
 def setUp(self):
     super(TestLoggingNotifier, self).setUp()
     with unit.StubConfig(notifier="logging"):
         self.notifier = notifier.notifier()
     self.logger = logging.getLogger('melange.notifier.logging_notifier')