kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Filters & Notifications - fixed tokens in filter not found notification
rodzic
08ee223b5f
commit
e99f07a51d
|
@ -1,8 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import re
|
|
||||||
from flask import url_for
|
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
|
from changedetectionio.model import App
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,6 +120,10 @@ def run_filter_test(client, content_filter):
|
||||||
notification = f.read()
|
notification = f.read()
|
||||||
assert not 'CSS/xPath filter was not present in the page' in notification
|
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
|
# cleanup for the next
|
||||||
client.get(
|
client.get(
|
||||||
url_for("form_delete", uuid="all"),
|
url_for("form_delete", uuid="all"),
|
||||||
|
|
|
@ -93,7 +93,7 @@ class update_worker(threading.Thread):
|
||||||
return
|
return
|
||||||
|
|
||||||
n_object = {'notification_title': 'Changedetection.io - Alert - CSS/xPath filter was not present in the page',
|
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']),
|
", ".join(watch['include_filters']),
|
||||||
threshold),
|
threshold),
|
||||||
'notification_format': 'text'}
|
'notification_format': 'text'}
|
||||||
|
|
Ładowanie…
Reference in New Issue