diff --git a/changedetectionio/tests/test_filter_failure_notification.py b/changedetectionio/tests/test_filter_failure_notification.py index dd12d79b..1e89fc83 100644 --- a/changedetectionio/tests/test_filter_failure_notification.py +++ b/changedetectionio/tests/test_filter_failure_notification.py @@ -1,8 +1,7 @@ import os import time -import re from flask import url_for -from .util import set_original_response, live_server_setup +from .util import set_original_response, live_server_setup, extract_UUID_from_client from changedetectionio.model import App @@ -121,6 +120,10 @@ def run_filter_test(client, content_filter): notification = f.read() assert not 'CSS/xPath filter was not present in the page' in notification + # Re #1247 - All tokens got replaced + uuid = extract_UUID_from_client(client) + assert uuid in notification + # cleanup for the next client.get( url_for("form_delete", uuid="all"), diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index 0e902a87..0159828e 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -93,7 +93,7 @@ class update_worker(threading.Thread): return n_object = {'notification_title': 'Changedetection.io - Alert - CSS/xPath filter was not present in the page', - 'notification_body': "Your configured CSS/xPath filters of '{}' for {{watch_url}} did not appear on the page after {} attempts, did the page change layout?\n\nLink: {{base_url}}/edit/{{watch_uuid}}\n\nThanks - Your omniscient changedetection.io installation :)\n".format( + 'notification_body': "Your configured CSS/xPath filters of '{}' for {{{{watch_url}}}} did not appear on the page after {} attempts, did the page change layout?\n\nLink: {{{{base_url}}}}/edit/{{{{watch_uuid}}}}\n\nThanks - Your omniscient changedetection.io installation :)\n".format( ", ".join(watch['include_filters']), threshold), 'notification_format': 'text'}