mirror of
https://github.com/caronc/apprise.git
synced 2025-08-09 08:25:07 +02:00
Added Parse Platform Support (#212)
This commit is contained in:
@ -2264,6 +2264,66 @@ TEST_URLS = (
|
||||
'test_requests_exceptions': True,
|
||||
}),
|
||||
|
||||
##################################
|
||||
# NotifyParsePlatform
|
||||
##################################
|
||||
('parsep://', {
|
||||
'instance': None,
|
||||
}),
|
||||
# API Key + bad url
|
||||
('parsep://:@/', {
|
||||
'instance': None,
|
||||
}),
|
||||
# APIkey; no app_id or master_key
|
||||
('parsep://%s' % ('a' * 32), {
|
||||
'instance': TypeError,
|
||||
}),
|
||||
# APIkey; no master_key
|
||||
('parsep://app_id@%s' % ('a' * 32), {
|
||||
'instance': TypeError,
|
||||
}),
|
||||
# APIkey; no app_id
|
||||
('parseps://:master_key@%s' % ('a' * 32), {
|
||||
'instance': TypeError,
|
||||
}),
|
||||
# app_id + master_key (using arguments=)
|
||||
('parseps://localhost?app_id=%s&master_key=%s' % ('a' * 32, 'd' * 32), {
|
||||
'instance': plugins.NotifyParsePlatform,
|
||||
|
||||
# Our expected url(privacy=True) startswith() response:
|
||||
'privacy_url': 'parseps://a...a:d...d@localhost',
|
||||
}),
|
||||
# Set a device id + custom port
|
||||
('parsep://app_id:master_key@localhost:8080?device=ios', {
|
||||
'instance': plugins.NotifyParsePlatform,
|
||||
}),
|
||||
# invalid device id
|
||||
('parsep://app_id:master_key@localhost?device=invalid', {
|
||||
'instance': TypeError,
|
||||
}),
|
||||
# Normal Query
|
||||
('parseps://app_id:master_key@localhost', {
|
||||
'instance': plugins.NotifyParsePlatform,
|
||||
}),
|
||||
('parseps://app_id:master_key@localhost', {
|
||||
'instance': plugins.NotifyParsePlatform,
|
||||
# force a failure
|
||||
'response': False,
|
||||
'requests_response_code': requests.codes.internal_server_error,
|
||||
}),
|
||||
('parseps://app_id:master_key@localhost', {
|
||||
'instance': plugins.NotifyParsePlatform,
|
||||
# throw a bizzare code forcing us to fail to look it up
|
||||
'response': False,
|
||||
'requests_response_code': 999,
|
||||
}),
|
||||
('parseps://app_id:master_key@localhost', {
|
||||
'instance': plugins.NotifyParsePlatform,
|
||||
# Throws a series of connection and transfer exceptions when this flag
|
||||
# is set and tests that we gracfully handle them
|
||||
'test_requests_exceptions': True,
|
||||
}),
|
||||
|
||||
##################################
|
||||
# NotifyProwl
|
||||
##################################
|
||||
|
Reference in New Issue
Block a user