From 9270d4053ba123973ac236064e6cd5ba28da74a5 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 9 Sep 2024 20:34:43 +0200 Subject: [PATCH] smarter check? --- changedetectionio/tests/test_filter_failure_notification.py | 2 +- changedetectionio/tests/util.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changedetectionio/tests/test_filter_failure_notification.py b/changedetectionio/tests/test_filter_failure_notification.py index 9632ab60..ca1a440b 100644 --- a/changedetectionio/tests/test_filter_failure_notification.py +++ b/changedetectionio/tests/test_filter_failure_notification.py @@ -98,7 +98,7 @@ def run_filter_test(client, live_server, content_filter): for i in range(0, App._FILTER_FAILURE_THRESHOLD_ATTEMPTS_DEFAULT-2): client.get(url_for("form_watch_checknow"), follow_redirects=True) wait_for_all_checks(client) - time.sleep(2) # delay for apprise to fire + wait_for_notification_endpoint_output() assert not os.path.isfile("test-datastore/notification.txt"), f"test-datastore/notification.txt should not exist - Attempt {i} when threshold is {App._FILTER_FAILURE_THRESHOLD_ATTEMPTS_DEFAULT}" # We should see something in the frontend diff --git a/changedetectionio/tests/util.py b/changedetectionio/tests/util.py index 2e8ab014..bf5305b1 100644 --- a/changedetectionio/tests/util.py +++ b/changedetectionio/tests/util.py @@ -78,6 +78,7 @@ def set_more_modified_response(): def wait_for_notification_endpoint_output(): '''Apprise can take a few seconds to fire''' + #@todo - could check the apprise object directly instead of looking for this file from os.path import isfile for i in range(1, 20): time.sleep(1)