mirror of
https://github.com/caronc/apprise.git
synced 2025-08-10 00:38:02 +02:00
Added Ryver support; refs #54
This commit is contained in:
@ -1054,6 +1054,64 @@ TEST_URLS = (
|
||||
'test_requests_exceptions': True,
|
||||
}),
|
||||
|
||||
##################################
|
||||
# NotifyRyver
|
||||
##################################
|
||||
('ryver://', {
|
||||
'instance': None,
|
||||
}),
|
||||
('ryver://:@/', {
|
||||
'instance': None,
|
||||
}),
|
||||
('ryver://apprise', {
|
||||
# Just org provided (no token)
|
||||
'instance': None,
|
||||
}),
|
||||
('ryver://abc,#/ckhrjW8w672m6HG', {
|
||||
# Invalid org provided
|
||||
'instance': None,
|
||||
}),
|
||||
('ryver://a/ckhrjW8w672m6HG', {
|
||||
# org is too short
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('ryver://apprise/ckhrjW8w67HG', {
|
||||
# Invalid token specified
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('ryver://apprise/ckhrjW8w672m6HG?webhook=invalid', {
|
||||
# Invalid webhook provided
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('ryver://apprise/ckhrjW8w672m6HG?webhook=slack', {
|
||||
# No username specified; this is still okay as we use whatever
|
||||
# the user told the webhook to use; set our slack mode
|
||||
'instance': plugins.NotifyRyver,
|
||||
}),
|
||||
('ryver://caronc@apprise/ckhrjW8w672m6HG', {
|
||||
'instance': plugins.NotifyRyver,
|
||||
# don't include an image by default
|
||||
'include_image': False,
|
||||
}),
|
||||
('ryver://apprise/ckhrjW8w672m6HG', {
|
||||
'instance': plugins.NotifyRyver,
|
||||
# force a failure
|
||||
'response': False,
|
||||
'requests_response_code': requests.codes.internal_server_error,
|
||||
}),
|
||||
('ryver://apprise/ckhrjW8w672m6HG', {
|
||||
'instance': plugins.NotifyRyver,
|
||||
# throw a bizzare code forcing us to fail to look it up
|
||||
'response': False,
|
||||
'requests_response_code': 999,
|
||||
}),
|
||||
('ryver://apprise/ckhrjW8w672m6HG', {
|
||||
'instance': plugins.NotifyRyver,
|
||||
# Throws a series of connection and transfer exceptions when this flag
|
||||
# is set and tests that we gracfully handle them
|
||||
'test_requests_exceptions': True,
|
||||
}),
|
||||
|
||||
##################################
|
||||
# NotifySlack
|
||||
##################################
|
||||
|
Reference in New Issue
Block a user