From 2ca7bfb09a0a78de560cf7559e6ca14a39b2a9db Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 8 May 2025 16:52:19 +0200 Subject: [PATCH] give chardet longer to run --- changedetectionio/tests/test_rss.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/changedetectionio/tests/test_rss.py b/changedetectionio/tests/test_rss.py index e70fb027..5701f690 100644 --- a/changedetectionio/tests/test_rss.py +++ b/changedetectionio/tests/test_rss.py @@ -219,6 +219,15 @@ def test_rss_bad_chars_breaking(client, live_server): rss_token = extract_rss_token_from_UI(client) uuid = next(iter(live_server.app.config['DATASTORE'].data['watching'])) + i=0 + from loguru import logger + # Because chardet could take a long time + while i<=10: + logger.debug(f"History was {live_server.app.config['DATASTORE'].data['watching'][uuid].history_n}..") + if live_server.app.config['DATASTORE'].data['watching'][uuid].history_n ==2: + break + i+=1 + time.sleep(2) assert live_server.app.config['DATASTORE'].data['watching'][uuid].history_n == 2 # Check RSS feed is still working