Beispiel #1
0
    def test_notify(self):
        NotifiersConfig.get()['pushbullet']['token'] = 'test'

        pushbullet_notifier = PushbulletNotifier.from_config()
        self.PushBullet.assert_called_once_with("test")

        pushbullet_notifier.notify("test", "test")

        self.PushBullet.return_value.push_note.assert_called_once_with("test", "test")
Beispiel #2
0
    def test_notify(self,Config):
        Config.pushbullet_token = 'test'

        pushbullet_notifier = PushbulletNotifier.from_config()
        self.PushBullet.assert_called_once_with("test")

        pushbullet_notifier.notify("test", "test")

        self.PushBullet.return_value.push_note.assert_called_once_with("test", "test")
Beispiel #3
0
    def test_notify(self, Config):
        Config.pushbullet_token = 'test'

        pushbullet_notifier = PushbulletNotifier.from_config()
        self.PushBullet.assert_called_once_with("test")

        pushbullet_notifier.notify("test", "test")

        self.PushBullet.return_value.push_note.assert_called_once_with(
            "test", "test")
Beispiel #4
0
    def test_is_enabled_enabled(self, Config):
        Config.pushbullet_token = 'test'

        self.assertTrue(PushbulletNotifier.is_enabled())
Beispiel #5
0
    def test_is_enabled_disabled(self, Config):
        Config.pushbullet_token = ''

        self.assertFalse(PushbulletNotifier.is_enabled())
Beispiel #6
0
    def test_is_enabled_enabled(self):
        NotifiersConfig.get()['pushbullet']['enabled'] = True

        self.assertTrue(PushbulletNotifier.is_enabled())
Beispiel #7
0
    def test_is_enabled_disabled(self):
        NotifiersConfig.get()['pushbullet']['enabled'] = False

        self.assertFalse(PushbulletNotifier.is_enabled())
Beispiel #8
0
    def test_is_enabled_enabled(self, Config):
        Config.pushbullet_token = 'test'

        self.assertTrue(PushbulletNotifier.is_enabled())
Beispiel #9
0
    def test_is_enabled_disabled(self, Config):
        Config.pushbullet_token = ''

        self.assertFalse(PushbulletNotifier.is_enabled())