Skip to content

Commit 6e57e33

Browse files
committed
updated to work with Apprise v1.8.0
1 parent 135dd4e commit 6e57e33

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

apprise_api/api/tests/test_notify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from inspect import cleandoc
3434

3535
# Grant access to our Notification Manager Singleton
36-
N_MGR = apprise.NotificationManager.NotificationManager()
36+
N_MGR = apprise.manager_plugins.NotificationManager()
3737

3838

3939
class NotifyTests(SimpleTestCase):
@@ -1176,7 +1176,7 @@ def test_notify_by_loaded_urls_with_json(self, mock_notify):
11761176
assert mock_notify.call_count == 1
11771177
assert response['content-type'].startswith('text/html')
11781178

1179-
@mock.patch('apprise.plugins.NotifyEmail.NotifyEmail.send')
1179+
@mock.patch('apprise.plugins.email.NotifyEmail.send')
11801180
def test_notify_with_filters(self, mock_send):
11811181
"""
11821182
Test workings of APPRISE_DENY_SERVICES and APPRISE_ALLOW_SERVICES

apprise_api/api/tests/test_stateful_notify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import inspect
3636

3737
# Grant access to our Notification Manager Singleton
38-
N_MGR = apprise.NotificationManager.NotificationManager()
38+
N_MGR = apprise.manager_plugins.NotificationManager()
3939

4040

4141
class StatefulNotifyTests(SimpleTestCase):

apprise_api/api/tests/test_stateless_notify.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import apprise
3434

3535
# Grant access to our Notification Manager Singleton
36-
N_MGR = apprise.NotificationManager.NotificationManager()
36+
N_MGR = apprise.manager_plugins.NotificationManager()
3737

3838

3939
class StatelessNotifyTests(SimpleTestCase):
@@ -350,7 +350,7 @@ def test_stateless_notify_recursion(self, mock_notify):
350350
}
351351

352352
# Monkey Patch
353-
apprise.plugins.NotifyEmail.NotifyEmail.enabled = True
353+
apprise.plugins.email.NotifyEmail.enabled = True
354354

355355
# At a minimum 'body' is requred
356356
form = NotifyByUrlForm(data=form_data)
@@ -606,7 +606,7 @@ def test_notify_by_loaded_urls_with_json(self, mock_notify):
606606
assert response.status_code == 400
607607
assert mock_notify.call_count == 0
608608

609-
@mock.patch('apprise.plugins.NotifyJSON.NotifyJSON.send')
609+
@mock.patch('apprise.plugins.custom_json.NotifyJSON.send')
610610
def test_notify_with_filters(self, mock_send):
611611
"""
612612
Test workings of APPRISE_DENY_SERVICES and APPRISE_ALLOW_SERVICES

apprise_api/api/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ class AttachmentPayload(object):
7878
)
7979

8080
# Access our Attachment Manager Singleton
81-
A_MGR = apprise.AttachmentManager.AttachmentManager()
81+
A_MGR = apprise.manager_attachment.AttachmentManager()
8282

8383
# Access our Notification Manager Singleton
84-
N_MGR = apprise.NotificationManager.NotificationManager()
84+
N_MGR = apprise.manager_plugins.NotificationManager()
8585

8686

8787
class Attachment(A_MGR['file']):

apprise_api/api/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def default(self, obj):
100100
if isinstance(obj, set):
101101
return list(obj)
102102

103-
elif isinstance(obj, apprise.AppriseLocale.LazyTranslation):
103+
elif isinstance(obj, apprise.locale.LazyTranslation):
104104
return str(obj)
105105

106106
return super().default(obj)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# apprise @ git+https://github.com/caronc/apprise@custom-tag-or-version
1111

1212
## 3. The below grabs our stable version (generally the best choice):
13-
apprise == 1.7.6
13+
apprise == 1.8.0
1414

1515
## Apprise API Minimum Requirements
1616
django

0 commit comments

Comments
 (0)