From f01e6d8a3b0e5471c3a49bd9d4ef179610e6a9c4 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sun, 16 Oct 2022 22:53:36 +0200 Subject: [PATCH] Fix tests for `NotifyGnome` (#703) --- apprise/plugins/NotifyGnome.py | 2 +- test/test_plugin_gnome.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apprise/plugins/NotifyGnome.py b/apprise/plugins/NotifyGnome.py index a9d78702..a6f6f6e4 100644 --- a/apprise/plugins/NotifyGnome.py +++ b/apprise/plugins/NotifyGnome.py @@ -211,7 +211,7 @@ class NotifyGnome(NotifyBase): except Exception as e: self.logger.warning( - "Could not load notification icon (%s). ", icon_path) + "Could not load notification icon (%s).", icon_path) self.logger.debug(f'Gnome Exception: {e}') notification.show() diff --git a/test/test_plugin_gnome.py b/test/test_plugin_gnome.py index b1a05c4c..11159141 100644 --- a/test/test_plugin_gnome.py +++ b/test/test_plugin_gnome.py @@ -305,8 +305,8 @@ def test_plugin_gnome_missing_icon(mocker, obj): assert obj.notify(title='title', body='body', notify_type=apprise.NotifyType.INFO) is True assert logger.mock_calls == [ - call.warning('Could not load notification icon (%s). ' - 'Reason: Something failed', ANY), + call.warning('Could not load notification icon (%s).', ANY), + call.debug('Gnome Exception: Something failed'), call.info('Sent Gnome notification.'), ] @@ -365,7 +365,6 @@ def test_plugin_gnome_notify_croaks(mocker, obj): title='title', body='body', notify_type=apprise.NotifyType.INFO) is False assert logger.mock_calls == [ - call.warning('Failed to send Gnome notification. ' - 'Reason: Something failed'), - call.exception('Gnome Exception') + call.warning('Failed to send Gnome notification.'), + call.debug('Gnome Exception: Something failed'), ]