Fix bad return in Gotify method
This commit is contained in:
parent
d8a82c1334
commit
1e0099400d
|
@ -99,7 +99,7 @@ class Gotify:
|
||||||
logging.warning(
|
logging.warning(
|
||||||
'No client key is configured. No messages could be retrieved.'
|
'No client key is configured. No messages could be retrieved.'
|
||||||
)
|
)
|
||||||
return []
|
return dict()
|
||||||
logging.debug('Fetching existing messages from Gotify')
|
logging.debug('Fetching existing messages from Gotify')
|
||||||
return self._call('GET', '/message')['json'].get('messages', [])
|
return self._call('GET', '/message')['json'].get('messages', [])
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,9 @@ class GotifyTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_messages(self):
|
def test_messages(self):
|
||||||
"""Test"""
|
"""Test"""
|
||||||
self.assertListEqual(
|
self.assertDictEqual(
|
||||||
self.gotify_client.messages(),
|
self.gotify_client.messages(),
|
||||||
[],
|
dict(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@patch('http.client.HTTPConnection.request')
|
@patch('http.client.HTTPConnection.request')
|
||||||
|
|
Loading…
Reference in a new issue