PopcornNotify Support added (#148)

This commit is contained in:
Chris Caron
2020-07-23 10:04:59 -04:00
committed by GitHub
parent 89336f8105
commit 70b3f51f6a
5 changed files with 367 additions and 8 deletions

View File

@ -4001,6 +4001,58 @@ TEST_URLS = (
'test_requests_exceptions': True,
}),
##################################
# NotifyPopcorn (PopcornNotify)
##################################
('popcorn://', {
# No hostname/apikey specified
'instance': None,
}),
('popcorn://{}/18001231234'.format('_' * 9), {
# invalid apikey
'instance': TypeError,
}),
('popcorn://{}/1232348923489234923489234289-32423'.format('a' * 9), {
# invalid phone number
'instance': plugins.NotifyPopcornNotify,
'notify_response': False,
}),
('popcorn://{}/abc'.format('b' * 9), {
# invalid email
'instance': plugins.NotifyPopcornNotify,
'notify_response': False,
}),
('popcorn://{}/15551232000/user@example.com'.format('c' * 9), {
# value phone and email
'instance': plugins.NotifyPopcornNotify,
}),
('popcorn://{}/15551232000/user@example.com?batch=yes'.format('w' * 9), {
# value phone and email with batch mode set
'instance': plugins.NotifyPopcornNotify,
}),
('popcorn://{}/?to=15551232000'.format('w' * 9), {
# reference to to=
'instance': plugins.NotifyPopcornNotify,
}),
('popcorn://{}/15551232000'.format('x' * 9), {
'instance': plugins.NotifyPopcornNotify,
# force a failure
'response': False,
'requests_response_code': requests.codes.internal_server_error,
}),
('popcorn://{}/15551232000'.format('y' * 9), {
'instance': plugins.NotifyPopcornNotify,
# throw a bizzare code forcing us to fail to look it up
'response': False,
'requests_response_code': 999,
}),
('popcorn://{}/15551232000'.format('z' * 9), {
'instance': plugins.NotifyPopcornNotify,
# Throws a series of connection and transfer exceptions when this flag
# is set and tests that we gracfully handle them
'test_requests_exceptions': True,
}),
##################################
# NotifyWebexTeams
##################################