socketio-tweaks
dgtlmoon 2025-06-03 09:22:04 +02:00
rodzic 5c7c548929
commit 40226dbad7
5 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -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

Wyświetl plik

@ -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")

Wyświetl plik

@ -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()

Wyświetl plik

@ -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')