コード例 #1
0
ファイル: test_notifier.py プロジェクト: buluba89/Yatcobot
    def test_send_notification(self):
        n = NotificationService()
        #delete if some notifier is actualy loaded
        n.active_notifiers = []
        for i in range(10):
            n.active_notifiers.append(MagicMock())

        n.send_notification('test', 'test')

        for x in n.active_notifiers:
            x.notify.assert_called_once_with("test", "test")
コード例 #2
0
    def test_send_notification(self):
        n = NotificationService()
        # delete if some notifier is actualy loaded
        n.active_notifiers = []
        for i in range(10):
            n.active_notifiers.append(MagicMock())

        n.send_notification('test', 'test')

        for x in n.active_notifiers:
            x.notify.assert_called_once_with("test", "test")
コード例 #3
0
ファイル: test_notifier.py プロジェクト: buluba89/Yatcobot
    def test_is_enabled_disabled(self):
        n = NotificationService()
        #delete if some notifier is actualy loaded
        n.active_notifiers = []

        self.assertFalse(n.is_enabled())
コード例 #4
0
    def test_is_enabled_disabled(self):
        n = NotificationService()
        # delete if some notifier is actualy loaded
        n.active_notifiers = []

        self.assertFalse(n.is_enabled())