From 3e04a215d041c3f40f7b719842d9e6bff8966e07 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 10 Nov 2025 11:50:24 +0100 Subject: [PATCH] make test less brittle --- changedetectionio/tests/test_jsonpath_jq_selector.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/changedetectionio/tests/test_jsonpath_jq_selector.py b/changedetectionio/tests/test_jsonpath_jq_selector.py index ec90de03..f3e4006e 100644 --- a/changedetectionio/tests/test_jsonpath_jq_selector.py +++ b/changedetectionio/tests/test_jsonpath_jq_selector.py @@ -442,13 +442,12 @@ def test_correct_header_detect(client, live_server, measure_memory_usage, datast snapshot_contents = watch.get_history_snapshot(timestamp=dates[0]) assert b'"hello": 123,' in res.data # properly html escaped in the front end - + import json + data = json.loads(snapshot_contents) + keys = list(data.keys()) # Should be correctly formatted and sorted, ("world" goes to end) - assert snapshot_contents == """{ - "hello": 123, - "world": 123 -}""" - + assert keys == ["hello", "world"] + delete_all_watches(client) def test_check_jsonpath_ext_filter(client, live_server, measure_memory_usage, datastore_path):