mirror of https://github.com/caronc/apprise
inline doc cleanup + messagebird minor fix
parent
03295517ed
commit
119863568a
|
@ -59,7 +59,7 @@ class NotifyMessageBird(NotifyBase):
|
||||||
secure_protocol = 'msgbird'
|
secure_protocol = 'msgbird'
|
||||||
|
|
||||||
# A URL that takes you to the setup/help of the specific protocol
|
# A URL that takes you to the setup/help of the specific protocol
|
||||||
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_msgbird'
|
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_messagebird'
|
||||||
|
|
||||||
# MessageBird uses the http protocol with JSON requests
|
# MessageBird uses the http protocol with JSON requests
|
||||||
notify_url = 'https://rest.messagebird.com/messages'
|
notify_url = 'https://rest.messagebird.com/messages'
|
||||||
|
@ -89,6 +89,7 @@ class NotifyMessageBird(NotifyBase):
|
||||||
'name': _('Source Phone No'),
|
'name': _('Source Phone No'),
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
'prefix': '+',
|
'prefix': '+',
|
||||||
|
'required': True,
|
||||||
'regex': (r'[0-9\s)(+-]+', 'i'),
|
'regex': (r'[0-9\s)(+-]+', 'i'),
|
||||||
},
|
},
|
||||||
'target_phone': {
|
'target_phone': {
|
||||||
|
|
|
@ -3628,7 +3628,7 @@ def test_notify_twilio_plugin(mock_post):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact account_sid was not
|
# Exception should be thrown about the fact the account_sid was not
|
||||||
# specified
|
# specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
|
@ -3639,7 +3639,7 @@ def test_notify_twilio_plugin(mock_post):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact account_sid was not
|
# Exception should be thrown about the fact the auth_token was not
|
||||||
# specified
|
# specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
|
@ -3687,7 +3687,7 @@ def test_notify_nexmo_plugin(mock_post):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact apikey was not
|
# Exception should be thrown about the fact the apikey was not
|
||||||
# specified
|
# specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
|
@ -3698,7 +3698,7 @@ def test_notify_nexmo_plugin(mock_post):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact apikey was not
|
# Exception should be thrown about the fact the secret was not
|
||||||
# specified
|
# specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
|
@ -3744,7 +3744,7 @@ def test_notify_msg91_plugin(mock_post):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact authkey was not
|
# Exception should be thrown about the fact the authkey was not
|
||||||
# specified
|
# specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
|
@ -3754,8 +3754,8 @@ def test_notify_msg91_plugin(mock_post):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact authkey was not
|
# Exception should be thrown about the fact the authkey was
|
||||||
# specified
|
# invalid
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
|
|
||||||
|
@ -3975,7 +3975,8 @@ def test_notify_ifttt_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact webhook_id was specified
|
# Exception should be thrown about the fact the webhook_id was
|
||||||
|
# specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -3984,7 +3985,7 @@ def test_notify_ifttt_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact no token was specified
|
# Exception should be thrown about the fact no events were specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
obj = plugins.NotifyIFTTT(webhook_id=webhook_id, events=events)
|
obj = plugins.NotifyIFTTT(webhook_id=webhook_id, events=events)
|
||||||
|
@ -4542,7 +4543,7 @@ def test_notify_telegram_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact no token was specified
|
# Exception should be thrown about the fact no bot token was specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -4552,7 +4553,7 @@ def test_notify_telegram_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact an invalid token was
|
# Exception should be thrown about the fact an invalid bot token was
|
||||||
# specified
|
# specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
|
@ -4676,7 +4677,7 @@ def test_notify_telegram_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact no token was specified
|
# Exception should be thrown about the fact no bot token was specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
# Detect the bot with a bad response
|
# Detect the bot with a bad response
|
||||||
|
@ -4691,7 +4692,7 @@ def test_notify_telegram_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact no token was specified
|
# Exception should be thrown over internal server error caused
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
# Test our bot detection with an unmappable html error
|
# Test our bot detection with an unmappable html error
|
||||||
|
@ -4702,7 +4703,7 @@ def test_notify_telegram_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact no token was specified
|
# Exception should be thrown over invali internal error no
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
# Do it again but this time provide a failure message
|
# Do it again but this time provide a failure message
|
||||||
|
@ -4713,7 +4714,7 @@ def test_notify_telegram_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact no token was specified
|
# Exception should be thrown about the fact no bot token was specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
# Do it again but this time provide a failure message and perform a
|
# Do it again but this time provide a failure message and perform a
|
||||||
|
@ -4731,7 +4732,8 @@ def test_notify_telegram_plugin(mock_post, mock_get):
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Exception should be thrown about the fact no token was specified
|
# Exception should be thrown about the fact no bot token was
|
||||||
|
# specified
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue