Exemplo n.º 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)
Exemplo n.º 2
0
    def setUp(self):
        super(TestQueueNotifier, self).setUp()

        with unit.StubConfig(notifier="queue"):
            self.notifier = notifier.notifier()
Exemplo n.º 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')
Exemplo n.º 4
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')