diff --git a/changedetectionio/tests/proxy_list/test_proxy.py b/changedetectionio/tests/proxy_list/test_proxy.py index cefdce30..f3a119ad 100644 --- a/changedetectionio/tests/proxy_list/test_proxy.py +++ b/changedetectionio/tests/proxy_list/test_proxy.py @@ -16,4 +16,4 @@ def test_check_basic_change_detection_functionality(client, live_server, measure ) assert b"1 Imported" in res.data - time.sleep(3) + wait_for_all_checks(client) diff --git a/changedetectionio/tests/proxy_socks5/test_socks5_proxy.py b/changedetectionio/tests/proxy_socks5/test_socks5_proxy.py index 01152050..b81a79fc 100644 --- a/changedetectionio/tests/proxy_socks5/test_socks5_proxy.py +++ b/changedetectionio/tests/proxy_socks5/test_socks5_proxy.py @@ -1,7 +1,8 @@ #!/usr/bin/env python3 +import json import os from flask import url_for -from changedetectionio.tests.util import live_server_setup, wait_for_all_checks +from changedetectionio.tests.util import live_server_setup, wait_for_all_checks, extract_UUID_from_client def set_response(): @@ -18,7 +19,6 @@ def set_response(): f.write(data) time.sleep(1) - def test_socks5(client, live_server, measure_memory_usage): live_server_setup(live_server) set_response() @@ -79,3 +79,24 @@ def test_socks5(client, live_server, measure_memory_usage): # Should see the proper string assert "Awesome, you made it".encode('utf-8') in res.data + + # PROXY CHECKER WIDGET CHECK - this needs more checking + uuid = extract_UUID_from_client(client) + + res = client.get( + url_for("check_proxies.start_check", uuid=uuid), + follow_redirects=True + ) + # It's probably already finished super fast :( + #assert b"RUNNING" in res.data + + wait_for_all_checks(client) + res = client.get( + url_for("check_proxies.get_recheck_status", uuid=uuid), + follow_redirects=True + ) + assert b"OK" in res.data + + res = client.get(url_for("form_delete", uuid="all"), follow_redirects=True) + assert b'Deleted' in res.data +