mirror of
https://github.com/caronc/apprise.git
synced 2025-08-09 00:15:03 +02:00
Added Google Firebase Cloud Messaging (FCM) Support (#329)
This commit is contained in:
@ -593,6 +593,61 @@ TEST_URLS = (
|
||||
'test_requests_exceptions': True,
|
||||
}),
|
||||
|
||||
##################################
|
||||
# NotifyFCM
|
||||
##################################
|
||||
('fcm://', {
|
||||
# We failed to identify any valid authentication
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('fcm://:@/', {
|
||||
# We failed to identify any valid authentication
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('fcm://apikey/', {
|
||||
# no project id specified
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('fcm://project@%20%20/', {
|
||||
# invalid apikey
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('fcm://project@apikey/', {
|
||||
# No targets specified; we will initialize but not notify anything
|
||||
'instance': plugins.NotifyFCM,
|
||||
'notify_response': False,
|
||||
}),
|
||||
('fcm://project@apikey/device', {
|
||||
# Valid device
|
||||
'instance': plugins.NotifyFCM,
|
||||
'privacy_url': 'fcm://project@a...y/device',
|
||||
}),
|
||||
('fcm://project@apikey/#topic', {
|
||||
# Valid topic
|
||||
'instance': plugins.NotifyFCM,
|
||||
'privacy_url': 'fcm://project@a...y/%23topic',
|
||||
}),
|
||||
('fcm://project@apikey/#topic1/device/%20/', {
|
||||
# Valid topic, valid device, and invalid entry
|
||||
'instance': plugins.NotifyFCM,
|
||||
}),
|
||||
('fcm://project@apikey?to=#topic1,device', {
|
||||
# Test to=
|
||||
'instance': plugins.NotifyFCM,
|
||||
}),
|
||||
('fcm://project@apikey/#topic1/device/', {
|
||||
'instance': plugins.NotifyFCM,
|
||||
# throw a bizzare code forcing us to fail to look it up
|
||||
'response': False,
|
||||
'requests_response_code': 999,
|
||||
}),
|
||||
('fcm://project@apikey/#topic1/device/', {
|
||||
'instance': plugins.NotifyFCM,
|
||||
# Throws a series of connection and transfer exceptions when this flag
|
||||
# is set and tests that we gracfully handle them
|
||||
'test_requests_exceptions': True,
|
||||
}),
|
||||
|
||||
##################################
|
||||
# NotifyFlock
|
||||
##################################
|
||||
|
Reference in New Issue
Block a user