mirror of
https://github.com/caronc/apprise.git
synced 2025-08-09 00:15:03 +02:00
Added Gotify Support; refs #23
This commit is contained in:
@ -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
|
||||
##################################
|
||||
|
Reference in New Issue
Block a user