mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-20 23:16:44 +00:00
WIP
This commit is contained in:
@@ -8,8 +8,6 @@ from ..diff import ADDED_STYLE, DIFF_HTML_LABEL_ADDED
|
||||
|
||||
sleep_time_for_fetch_thread = 3
|
||||
|
||||
|
||||
|
||||
def test_check_basic_change_detection_functionality_source(client, live_server, measure_memory_usage):
|
||||
set_original_response()
|
||||
test_url = 'source:'+url_for('test_endpoint', _external=True)
|
||||
@@ -52,9 +50,12 @@ def test_check_basic_change_detection_functionality_source(client, live_server,
|
||||
url_for("ui.ui_views.diff_history_page", uuid="first"),
|
||||
follow_redirects=True
|
||||
)
|
||||
|
||||
assert f'{DIFF_HTML_LABEL_ADDED.format(content="modified ")}head title</title></head>'.encode('utf-8') in res.data
|
||||
|
||||
# With diff-match-patch, HTML tags are properly tokenized and excluded from diff spans
|
||||
# Only "modified" is shown as added, while <head> and <title> tags remain unchanged
|
||||
assert b'<head><title>' in res.data
|
||||
assert b'title="Added"' in res.data
|
||||
assert b'>modified<' in res.data
|
||||
assert b'head title</title></head>' in res.data
|
||||
|
||||
|
||||
# `subtractive_selectors` should still work in `source:` type requests
|
||||
|
||||
Reference in New Issue
Block a user