예제 #1
0
파일: models.py 프로젝트: roaet/melange
 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)
예제 #2
0
    def setUp(self):
        super(TestQueueNotifier, self).setUp()

        with unit.StubConfig(notifier="queue"):
            self.notifier = notifier.notifier()
예제 #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')
예제 #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')