Added Gotify Support; refs #23

This commit is contained in:
Chris Caron
2019-03-11 21:17:55 -04:00
parent de32a69669
commit d2262e9167
5 changed files with 303 additions and 6 deletions

View File

@ -269,6 +269,51 @@ TEST_URLS = (
'test_requests_exceptions': True,
}),
##################################
# NotifyGotify
##################################
('gotify://', {
'instance': None,
}),
# No token specified
('gotify://hostname', {
'instance': TypeError,
}),
# Provide a hostname and token
('gotify://hostname/%s' % ('t' * 16), {
'instance': plugins.NotifyGotify,
}),
# Provide a priority
('gotify://hostname/%s?priority=high' % ('i' * 16), {
'instance': plugins.NotifyGotify,
}),
# Provide an invalid priority
('gotify://hostname:8008/%s?priority=invalid' % ('i' * 16), {
'instance': plugins.NotifyGotify,
}),
# An invalid url
('gotify://:@/', {
'instance': None,
}),
('gotify://hostname/%s/' % ('t' * 16), {
'instance': plugins.NotifyGotify,
# force a failure
'response': False,
'requests_response_code': requests.codes.internal_server_error,
}),
('gotifys://localhost/%s/' % ('t' * 16), {
'instance': plugins.NotifyGotify,
# throw a bizzare code forcing us to fail to look it up
'response': False,
'requests_response_code': 999,
}),
('gotify://localhost/%s/' % ('t' * 16), {
'instance': plugins.NotifyGotify,
# Throws a series of connection and transfer exceptions when this flag
# is set and tests that we gracfully handle them
'test_requests_exceptions': True,
}),
##################################
# NotifyIFTTT - If This Than That
##################################