diff --git a/changedetectionio/tests/test_add_replace_remove_filter.py b/changedetectionio/tests/test_add_replace_remove_filter.py index e119be49..3ca5284e 100644 --- a/changedetectionio/tests/test_add_replace_remove_filter.py +++ b/changedetectionio/tests/test_add_replace_remove_filter.py @@ -89,6 +89,8 @@ def test_check_removed_line_contains_trigger(client, live_server, measure_memory # Now add it back, and we should not get a trigger client.get(url_for("ui.mark_all_viewed"), follow_redirects=True) + time.sleep(0.2) + time.sleep(1) set_original(excluding=None) client.get(url_for("ui.form_watch_checknow"), follow_redirects=True) diff --git a/changedetectionio/tests/test_backend.py b/changedetectionio/tests/test_backend.py index f85fcaf2..2cbbc530 100644 --- a/changedetectionio/tests/test_backend.py +++ b/changedetectionio/tests/test_backend.py @@ -143,6 +143,7 @@ def test_check_basic_change_detection_functionality(client, live_server, measure # hit the mark all viewed link res = client.get(url_for("ui.mark_all_viewed"), follow_redirects=True) + time.sleep(0.2) assert b'class="has-unviewed' not in res.data assert b'unviewed' not in res.data diff --git a/changedetectionio/tests/test_conditions.py b/changedetectionio/tests/test_conditions.py index e6c453d3..9c6fae45 100644 --- a/changedetectionio/tests/test_conditions.py +++ b/changedetectionio/tests/test_conditions.py @@ -110,6 +110,8 @@ def test_conditions_with_text_and_number(client, live_server): wait_for_all_checks(client) client.get(url_for("ui.mark_all_viewed"), follow_redirects=True) + time.sleep(0.2) + wait_for_all_checks(client) # Case 1 @@ -126,6 +128,8 @@ def test_conditions_with_text_and_number(client, live_server): # Case 2: Change with one condition violated # Number out of range (150) but contains '5' client.get(url_for("ui.mark_all_viewed"), follow_redirects=True) + time.sleep(0.2) + set_number_out_of_range_response("150.5") diff --git a/changedetectionio/tests/test_nonrenderable_pages.py b/changedetectionio/tests/test_nonrenderable_pages.py index e665cf03..2b3bd305 100644 --- a/changedetectionio/tests/test_nonrenderable_pages.py +++ b/changedetectionio/tests/test_nonrenderable_pages.py @@ -96,6 +96,8 @@ def test_check_basic_change_detection_functionality(client, live_server, measure res = client.get(url_for("watchlist.index")) assert b'unviewed' in res.data client.get(url_for("ui.mark_all_viewed"), follow_redirects=True) + time.sleep(0.2) + # A totally zero byte (#2528) response should also not trigger an error set_zero_byte_response() diff --git a/changedetectionio/tests/test_restock_itemprop.py b/changedetectionio/tests/test_restock_itemprop.py index 13cab44e..0627f597 100644 --- a/changedetectionio/tests/test_restock_itemprop.py +++ b/changedetectionio/tests/test_restock_itemprop.py @@ -114,6 +114,8 @@ def test_itemprop_price_change(client, live_server): assert b'180.45' in res.data assert b'unviewed' in res.data client.get(url_for("ui.mark_all_viewed"), follow_redirects=True) + time.sleep(0.2) + # turning off price change trigger, but it should show the new price, with no change notification set_original_response(props_markup=instock_props[0], price='120.45')