From 1e0099400d322ebcfbf95fac2fe65c28af32a06a Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Tue, 25 May 2021 10:06:02 +0100 Subject: [PATCH] Fix bad return in Gotify method --- src/Alertify/gotify.py | 2 +- src/tests/Alertify/test_gotify.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Alertify/gotify.py b/src/Alertify/gotify.py index 2ae6e0a..794de71 100644 --- a/src/Alertify/gotify.py +++ b/src/Alertify/gotify.py @@ -99,7 +99,7 @@ class Gotify: logging.warning( 'No client key is configured. No messages could be retrieved.' ) - return [] + return dict() logging.debug('Fetching existing messages from Gotify') return self._call('GET', '/message')['json'].get('messages', []) diff --git a/src/tests/Alertify/test_gotify.py b/src/tests/Alertify/test_gotify.py index b0bf35e..27be280 100644 --- a/src/tests/Alertify/test_gotify.py +++ b/src/tests/Alertify/test_gotify.py @@ -62,9 +62,9 @@ class GotifyTest(unittest.TestCase): def test_messages(self): """Test""" - self.assertListEqual( + self.assertDictEqual( self.gotify_client.messages(), - [], + dict(), ) @patch('http.client.HTTPConnection.request')