|
|
@ -65,11 +65,8 @@ def test_check_block_changedetection_text_NOT_present(client, live_server, measu
|
|
|
|
live_server_setup(live_server)
|
|
|
|
live_server_setup(live_server)
|
|
|
|
# Use a mix of case in ZzZ to prove it works case-insensitive.
|
|
|
|
# Use a mix of case in ZzZ to prove it works case-insensitive.
|
|
|
|
ignore_text = "out of stoCk\r\nfoobar"
|
|
|
|
ignore_text = "out of stoCk\r\nfoobar"
|
|
|
|
|
|
|
|
|
|
|
|
set_original_ignore_response()
|
|
|
|
set_original_ignore_response()
|
|
|
|
|
|
|
|
|
|
|
|
# Give the endpoint time to spin up
|
|
|
|
|
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add our URL to the import page
|
|
|
|
# Add our URL to the import page
|
|
|
|
test_url = url_for('test_endpoint', _external=True)
|
|
|
|
test_url = url_for('test_endpoint', _external=True)
|
|
|
@ -127,13 +124,24 @@ def test_check_block_changedetection_text_NOT_present(client, live_server, measu
|
|
|
|
assert b'unviewed' not in res.data
|
|
|
|
assert b'unviewed' not in res.data
|
|
|
|
assert b'/test-endpoint' in res.data
|
|
|
|
assert b'/test-endpoint' in res.data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 2548
|
|
|
|
|
|
|
|
# Going back to the ORIGINAL should NOT trigger a change
|
|
|
|
|
|
|
|
set_original_ignore_response()
|
|
|
|
|
|
|
|
client.get(url_for("form_watch_checknow"), follow_redirects=True)
|
|
|
|
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
|
|
|
|
res = client.get(url_for("index"))
|
|
|
|
|
|
|
|
assert b'unviewed' not in res.data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Now we set a change where the text is gone, it should now trigger
|
|
|
|
# Now we set a change where the text is gone AND its different content, it should now trigger
|
|
|
|
set_modified_response_minus_block_text()
|
|
|
|
set_modified_response_minus_block_text()
|
|
|
|
client.get(url_for("form_watch_checknow"), follow_redirects=True)
|
|
|
|
client.get(url_for("form_watch_checknow"), follow_redirects=True)
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
res = client.get(url_for("index"))
|
|
|
|
res = client.get(url_for("index"))
|
|
|
|
assert b'unviewed' in res.data
|
|
|
|
assert b'unviewed' in res.data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = client.get(url_for("form_delete", uuid="all"), follow_redirects=True)
|
|
|
|
res = client.get(url_for("form_delete", uuid="all"), follow_redirects=True)
|
|
|
|
assert b'Deleted' in res.data
|
|
|
|
assert b'Deleted' in res.data
|
|
|
|