From d07d7a1b18ca591e3fa0d6e0fe1884f28af856d3 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 20 Nov 2022 11:35:35 +0100 Subject: [PATCH] Minor test improvements --- changedetectionio/tests/test_auth.py | 3 +-- changedetectionio/tests/test_css_selector.py | 8 +------- changedetectionio/tests/test_encoding.py | 3 --- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/changedetectionio/tests/test_auth.py b/changedetectionio/tests/test_auth.py index ab2fadf7..7ae16dfd 100644 --- a/changedetectionio/tests/test_auth.py +++ b/changedetectionio/tests/test_auth.py @@ -19,6 +19,7 @@ def test_basic_auth(client, live_server): follow_redirects=True ) assert b"1 Imported" in res.data + time.sleep(1) # Check form validation res = client.post( @@ -28,8 +29,6 @@ def test_basic_auth(client, live_server): ) assert b"Updated watch." in res.data - # Trigger a check - client.get(url_for("form_watch_checknow"), follow_redirects=True) time.sleep(1) res = client.get( url_for("preview_page", uuid="first"), diff --git a/changedetectionio/tests/test_css_selector.py b/changedetectionio/tests/test_css_selector.py index 5bac5e4b..a90cc0e8 100644 --- a/changedetectionio/tests/test_css_selector.py +++ b/changedetectionio/tests/test_css_selector.py @@ -89,9 +89,6 @@ def test_check_markup_include_filters_restriction(client, live_server): ) assert b"1 Imported" in res.data - # Trigger a check - client.get(url_for("form_watch_checknow"), follow_redirects=True) - # Give the thread time to pick it up time.sleep(sleep_time_for_fetch_thread) @@ -103,16 +100,13 @@ def test_check_markup_include_filters_restriction(client, live_server): follow_redirects=True ) assert b"Updated watch." in res.data - + time.sleep(1) # Check it saved res = client.get( url_for("edit_page", uuid="first"), ) assert bytes(include_filters.encode('utf-8')) in res.data - # Trigger a check - client.get(url_for("form_watch_checknow"), follow_redirects=True) - # Give the thread time to pick it up time.sleep(sleep_time_for_fetch_thread) # Make a change diff --git a/changedetectionio/tests/test_encoding.py b/changedetectionio/tests/test_encoding.py index f0d1fce9..88201590 100644 --- a/changedetectionio/tests/test_encoding.py +++ b/changedetectionio/tests/test_encoding.py @@ -70,9 +70,6 @@ def test_check_encoding_detection_missing_content_type_header(client, live_serve follow_redirects=True ) - # Trigger a check - client.get(url_for("form_watch_checknow"), follow_redirects=True) - # Give the thread time to pick it up time.sleep(2)