From aac59ab80611367328f135d59e4b9109ffe6a405 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 31 Aug 2022 13:34:47 +0200 Subject: [PATCH] Begin work on test --- changedetectionio/tests/test_notification.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/changedetectionio/tests/test_notification.py b/changedetectionio/tests/test_notification.py index 29b7e00d..d3496b8d 100644 --- a/changedetectionio/tests/test_notification.py +++ b/changedetectionio/tests/test_notification.py @@ -71,6 +71,7 @@ def test_check_notification(client, live_server): "url": test_url, "tag": "my tag", "title": "my title", + # No 'notification_use_default' here, so it's effectively False/off "headers": "", "fetch_backend": "html_requests"}) @@ -215,3 +216,15 @@ def test_notification_validation(client, live_server): url_for("form_delete", uuid="all"), follow_redirects=True ) + +def test_check_notification_use_default(client, live_server): + set_original_response() + test_url = url_for('test_endpoint', _external=True) + res = client.post( + url_for("form_quick_watch_add"), + data={"url": test_url, "tag": ''}, + follow_redirects=True + ) + assert b"Watch added" in res.data + #@todo set something in global + # @todo set something else in the watch