diff --git a/tests/test_notification.py b/tests/test_notification.py index ed8b364..7420fe8 100644 --- a/tests/test_notification.py +++ b/tests/test_notification.py @@ -13,8 +13,9 @@ class TestNotification(UptimeKumaTestCase): "name": "notification 1", "isDefault": True, "applyExisting": True, - "type": NotificationType.PUSHBYTECHULUS, - "pushAPIKey": "123456789" + "type": NotificationType.TELEGRAM, + "telegramChatID": "123456789", + "telegramBotToken": "987654321" } # test notification diff --git a/uptime_kuma_api/api.py b/uptime_kuma_api/api.py index 0c761cf..568c67a 100644 --- a/uptime_kuma_api/api.py +++ b/uptime_kuma_api/api.py @@ -305,7 +305,7 @@ def _check_arguments_notification(kwargs) -> None: _check_missing_arguments(required_args, kwargs) type_ = kwargs["type"] - required_args = notification_provider_options[type_] + required_args = [i for i, j in notification_provider_options[type_].items() if j["required"]] _check_missing_arguments(required_args, kwargs) _check_argument_conditions(notification_provider_conditions, kwargs)