Skip to content

A live bird collage card for your Home Assistant dashboard.

Move notifications utility into script.utils

Joe Weiss75a13f80d3ff
diff --git a/scripts/server.py b/scripts/server.py
index c7e5ffe3..239432f5 100755
--- a/scripts/server.py
+++ b/scripts/server.py
@@ -14,7 +14,7 @@ import socket
import threading
import os
-from notifications import sendAppriseNotifications
+from utils.notifications import sendAppriseNotifications
from utils.parse_settings import config_to_settings
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
diff --git a/scripts/notifications.py b/scripts/utils/notifications.py
similarity index 100%
rename from scripts/notifications.py
rename to scripts/utils/notifications.py
diff --git a/tests/test_apprise_notifications.py b/tests/test_apprise_notifications.py
index b2c53007..b17c3896 100644
--- a/tests/test_apprise_notifications.py
+++ b/tests/test_apprise_notifications.py
@@ -2,7 +2,7 @@ import os
import sqlite3
import pytest
-from scripts.notifications import sendAppriseNotifications
+from scripts.utils.notifications import sendAppriseNotifications
from datetime import datetime, timedelta
def create_test_db(db_file):
@@ -38,8 +38,9 @@ def clean_up_after_each_test():
yield
os.remove("test.db")
+
def test_notifications(mocker):
- notify_call = mocker.patch('scripts.notifications.notify')
+ notify_call = mocker.patch('scripts.utils.notifications.notify')
create_test_db("test.db")
settings_dict = {
"APPRISE_NOTIFICATION_TITLE": "New backyard bird!",