diff --git a/apprise/plugins/NotifyMailgun.py b/apprise/plugins/NotifyMailgun.py index 7db387e4..524308c7 100644 --- a/apprise/plugins/NotifyMailgun.py +++ b/apprise/plugins/NotifyMailgun.py @@ -117,9 +117,6 @@ class NotifyMailgun(NotifyBase): # Default Notify Format notify_format = NotifyFormat.HTML - # The default region to use if one isn't otherwise specified - mailgun_default_region = MailgunRegion.US - # The maximum amount of emails that can reside within a single # batch transfer default_batch_size = 2000 @@ -250,7 +247,8 @@ class NotifyMailgun(NotifyBase): # Store our region try: - self.region_name = self.mailgun_default_region \ + self.region_name = \ + NotifyMailgun.template_args['region']['default'] \ if region_name is None else region_name.lower() if self.region_name not in MAILGUN_REGIONS: @@ -667,7 +665,7 @@ class NotifyMailgun(NotifyBase): NotifyMailgun.unquote(results['qsd']['name']) if 'region' in results['qsd'] and len(results['qsd']['region']): - # Extract from name to associate with from address + # Acquire region if defined results['region_name'] = \ NotifyMailgun.unquote(results['qsd']['region']) diff --git a/apprise/plugins/NotifySMSEagle.py b/apprise/plugins/NotifySMSEagle.py index 5825ec17..ef2909d7 100644 --- a/apprise/plugins/NotifySMSEagle.py +++ b/apprise/plugins/NotifySMSEagle.py @@ -583,6 +583,8 @@ class NotifySMSEagle(NotifyBase): ['@{}'.format(x) for x in self.target_contacts], # Groups ['#{}'.format(x) for x in self.target_groups], + # Pass along the same invalid entries as were provided + self.invalid_targets, )]), params=NotifySMSEagle.urlencode(params), ) @@ -633,6 +635,7 @@ class NotifySMSEagle(NotifyBase): results['status'] = \ parse_bool(results['qsd'].get('status', False)) + # Get priority if 'priority' in results['qsd'] and len(results['qsd']['priority']): results['priority'] = \ NotifySMSEagle.unquote(results['qsd']['priority']) diff --git a/apprise/plugins/NotifySparkPost.py b/apprise/plugins/NotifySparkPost.py index c90adb8a..f4dbc65a 100644 --- a/apprise/plugins/NotifySparkPost.py +++ b/apprise/plugins/NotifySparkPost.py @@ -79,8 +79,10 @@ SPARKPOST_HTTP_ERROR_MAP = { } -# Priorities class SparkPostRegion: + """ + Regions + """ US = 'us' EU = 'eu' @@ -141,9 +143,6 @@ class NotifySparkPost(NotifyBase): # Default Notify Format notify_format = NotifyFormat.HTML - # The default region to use if one isn't otherwise specified - sparkpost_default_region = SparkPostRegion.US - # Define object templates templates = ( '{schema}://{user}@{host}:{apikey}/', @@ -254,7 +253,7 @@ class NotifySparkPost(NotifyBase): # Store our region try: - self.region_name = self.sparkpost_default_region \ + self.region_name = self.template_args['region']['default'] \ if region_name is None else region_name.lower() if self.region_name not in SPARKPOST_REGIONS: @@ -746,7 +745,7 @@ class NotifySparkPost(NotifyBase): NotifySparkPost.unquote(results['qsd']['name']) if 'region' in results['qsd'] and len(results['qsd']['region']): - # Extract from name to associate with from address + # Extract region results['region_name'] = \ NotifySparkPost.unquote(results['qsd']['region']) diff --git a/test/test_plugin_msteams.py b/test/test_plugin_msteams.py index 181d290e..31b3e721 100644 --- a/test/test_plugin_msteams.py +++ b/test/test_plugin_msteams.py @@ -192,7 +192,6 @@ def request_mock(mocker): @pytest.fixture def simple_template(tmpdir): - # Test cases where our URL is invalid. template = tmpdir.join("simple.json") template.write(""" {