From 641300578b7d7fa6a98f09ccc5368adc724f970d Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Fri, 2 Jan 2026 14:49:06 +0100 Subject: [PATCH] Fix template discovery path --- changedetectionio/pluggy_interface.py | 9 ++++++++- changedetectionio/tests/test_extract_csv.py | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/changedetectionio/pluggy_interface.py b/changedetectionio/pluggy_interface.py index 180ec61ac..08dba213f 100644 --- a/changedetectionio/pluggy_interface.py +++ b/changedetectionio/pluggy_interface.py @@ -430,7 +430,14 @@ def get_plugin_template_paths(): Returns: list: List of absolute paths to plugin template directories """ - template_paths = ['changedetectionio/processors/templates'] + template_paths = [] + + # Add the base processors/templates directory (as absolute path) + processors_templates_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'processors', 'templates') + if os.path.isdir(processors_templates_dir): + template_paths.append(processors_templates_dir) + logger.debug(f"Added base processors template path: {processors_templates_dir}") + # Scan built-in processor plugins from changedetectionio.processors import find_processors processor_list = find_processors() diff --git a/changedetectionio/tests/test_extract_csv.py b/changedetectionio/tests/test_extract_csv.py index f023e7089..69466e43d 100644 --- a/changedetectionio/tests/test_extract_csv.py +++ b/changedetectionio/tests/test_extract_csv.py @@ -26,6 +26,9 @@ def test_check_extract_text_from_diff(client, live_server, measure_memory_usage, assert b"1 Imported" in res.data wait_for_all_checks(client) + res = client.get(url_for("ui.ui_diff.diff_history_page_extract_GET", uuid="first")) + assert res.status_code == 200 + assert b'extract_regex' in res.data # Load in 5 different numbers/changes last_date="" @@ -40,9 +43,6 @@ def test_check_extract_text_from_diff(client, live_server, measure_memory_usage, client.get(url_for("ui.form_watch_checknow"), follow_redirects=True) wait_for_all_checks(client) - res = client.get(url_for("ui.ui_diff.diff_history_page_extract_POST", uuid="first")) - assert res.status_code == 200 - assert b'extract_regex' in res.data res = client.post(