diff --git a/test/logic/tile/tiles/TestGarbageContainerScheduleTile.py b/test/logic/tile/tiles/TestGarbageContainerScheduleTile.py index ff2cad117a1df886659ebe64a31fe0b4db20595b..d2d977101b6e7338e30ea9d2731d24bce53ca841 100644 --- a/test/logic/tile/tiles/TestGarbageContainerScheduleTile.py +++ b/test/logic/tile/tiles/TestGarbageContainerScheduleTile.py @@ -9,11 +9,18 @@ def example_settings(enableNotifications): return { "path": None, "garbageType": "Papier" or "Gelbe Säcke" or "Bioabfall" or "Restabfall", - "notificationViaPushbullet": { - "enable": enableNotifications, + "notification": { + "enableNotificationViaPushbullet": enableNotifications, "daysBeforeEvent": 1, "hour": 10, - "pushbulletToken": "myToken" + "pushbulletToken": "myToken", + 'enableNotificationViaNtfy': False, + 'ntfySettings': { + 'username': '', + 'password': '', + 'baseUrl': '', + 'topicName': '' + } } } @@ -60,7 +67,8 @@ class TestSendNotification: tile = GarbageContainerScheduleTile('myGarbageScheduleTile', example_settings(True), 10) requestsMock.post.return_value.status_code = 200 - with mock.patch.object(tile, '_get_current_date_time', wraps=tile._get_current_date_time) as currentDateTimeMock: + with mock.patch.object(tile, '_get_current_date_time', + wraps=tile._get_current_date_time) as currentDateTimeMock: currentDateTimeMock.return_value = datetime(year=2021, month=3, day=21, hour=11, minute=35, second=0) tile._send_notification(1, '') @@ -70,7 +78,8 @@ class TestSendNotification: def test_send_notification_before_settings_hour_should_do_nothing(self, helpersMock): tile = GarbageContainerScheduleTile('myGarbageScheduleTile', example_settings(True), 10) - with mock.patch.object(tile, '_get_current_date_time', wraps=tile._get_current_date_time) as currentDateTimeMock: + with mock.patch.object(tile, '_get_current_date_time', + wraps=tile._get_current_date_time) as currentDateTimeMock: currentDateTimeMock.return_value = datetime(year=2021, month=3, day=21, hour=9, minute=35, second=0) tile._send_notification(1, '') diff --git a/test/logic/tile/tiles/TestSensorLineChartTile.py b/test/logic/tile/tiles/TestSensorLineChartTile.py index 182913dac71c433d3782524c1f9648521f9bfcf2..9a9742071a072a3bbccd8097d5e98b73f3457fa1 100644 --- a/test/logic/tile/tiles/TestSensorLineChartTile.py +++ b/test/logic/tile/tiles/TestSensorLineChartTile.py @@ -177,7 +177,14 @@ class TestGetTimeSinceLastValue: 'enable': enable, 'limitInSeconds': 10, 'enableNotificationViaPushbullet': False, - 'pushbulletToken': None + 'pushbulletToken': None, + 'enableNotificationViaNtfy': False, + 'ntfySettings': { + 'username': '', + 'password': '', + 'baseUrl': '', + 'topicName': '' + } } def test_warnings_disabled_returns_empty_string(self): @@ -214,7 +221,14 @@ class TestSendNotification: 'enable': enable, 'limitInSeconds': 10, 'enableNotificationViaPushbullet': enableNotification, - 'pushbulletToken': 'myToken' + 'pushbulletToken': 'myToken', + 'enableNotificationViaNtfy': False, + 'ntfySettings': { + 'username': '', + 'password': '', + 'baseUrl': '', + 'topicName': '' + } } def __get_sensor_info(self) -> Dict[str, str]: