|
|
@ -77,9 +77,6 @@ def test_check_markup_include_filters_restriction(client, live_server):
|
|
|
|
|
|
|
|
|
|
|
|
set_original_response()
|
|
|
|
set_original_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)
|
|
|
|
res = client.post(
|
|
|
|
res = client.post(
|
|
|
@ -89,8 +86,7 @@ def test_check_markup_include_filters_restriction(client, live_server):
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assert b"1 Imported" in res.data
|
|
|
|
assert b"1 Imported" in res.data
|
|
|
|
|
|
|
|
|
|
|
|
# Give the thread time to pick it up
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
time.sleep(sleep_time_for_fetch_thread)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Goto the edit page, add our ignore text
|
|
|
|
# Goto the edit page, add our ignore text
|
|
|
|
# Add our URL to the import page
|
|
|
|
# Add our URL to the import page
|
|
|
@ -100,22 +96,22 @@ def test_check_markup_include_filters_restriction(client, live_server):
|
|
|
|
follow_redirects=True
|
|
|
|
follow_redirects=True
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assert b"Updated watch." in res.data
|
|
|
|
assert b"Updated watch." in res.data
|
|
|
|
time.sleep(1)
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
# Check it saved
|
|
|
|
# Check it saved
|
|
|
|
res = client.get(
|
|
|
|
res = client.get(
|
|
|
|
url_for("edit_page", uuid="first"),
|
|
|
|
url_for("edit_page", uuid="first"),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assert bytes(include_filters.encode('utf-8')) in res.data
|
|
|
|
assert bytes(include_filters.encode('utf-8')) in res.data
|
|
|
|
|
|
|
|
|
|
|
|
# Give the thread time to pick it up
|
|
|
|
|
|
|
|
time.sleep(sleep_time_for_fetch_thread)
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
# Make a change
|
|
|
|
# Make a change
|
|
|
|
set_modified_response()
|
|
|
|
set_modified_response()
|
|
|
|
|
|
|
|
|
|
|
|
# Trigger a check
|
|
|
|
# Trigger a check
|
|
|
|
client.get(url_for("form_watch_checknow"), follow_redirects=True)
|
|
|
|
client.get(url_for("form_watch_checknow"), follow_redirects=True)
|
|
|
|
# Give the thread time to pick it up
|
|
|
|
# Give the thread time to pick it up
|
|
|
|
time.sleep(sleep_time_for_fetch_thread)
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
|
|
|
|
|
|
|
|
# It should have 'unviewed' still
|
|
|
|
# It should have 'unviewed' still
|
|
|
|
# Because it should be looking at only that 'sametext' id
|
|
|
|
# Because it should be looking at only that 'sametext' id
|
|
|
@ -138,8 +134,6 @@ def test_check_multiple_filters(client, live_server):
|
|
|
|
</html>
|
|
|
|
</html>
|
|
|
|
""")
|
|
|
|
""")
|
|
|
|
|
|
|
|
|
|
|
|
# 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)
|
|
|
@ -149,7 +143,7 @@ def test_check_multiple_filters(client, live_server):
|
|
|
|
follow_redirects=True
|
|
|
|
follow_redirects=True
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assert b"1 Imported" in res.data
|
|
|
|
assert b"1 Imported" in res.data
|
|
|
|
time.sleep(1)
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
|
|
|
|
|
|
|
|
# Goto the edit page, add our ignore text
|
|
|
|
# Goto the edit page, add our ignore text
|
|
|
|
# Add our URL to the import page
|
|
|
|
# Add our URL to the import page
|
|
|
@ -164,9 +158,7 @@ def test_check_multiple_filters(client, live_server):
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assert b"Updated watch." in res.data
|
|
|
|
assert b"Updated watch." in res.data
|
|
|
|
|
|
|
|
|
|
|
|
# Give the thread time to pick it up
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
time.sleep(sleep_time_for_fetch_thread)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = client.get(
|
|
|
|
res = client.get(
|
|
|
|
url_for("preview_page", uuid="first"),
|
|
|
|
url_for("preview_page", uuid="first"),
|
|
|
|
follow_redirects=True
|
|
|
|
follow_redirects=True
|
|
|
|