From 42f3de191c18c8b82c29423e4089e72b26b13694 Mon Sep 17 00:00:00 2001 From: kobold-ai Date: Tue, 20 Oct 2026 17:45:53 +0200 Subject: [PATCH] Fix test cleanup in test_walking_path_and_presets for MariaDB backend --- scripts/test_walking_path_and_presets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/test_walking_path_and_presets.py b/scripts/test_walking_path_and_presets.py index 004e000..44be15e 100644 --- a/scripts/test_walking_path_and_presets.py +++ b/scripts/test_walking_path_and_presets.py @@ -70,6 +70,10 @@ def run_tests(): print("--- 4. Testing 1-Tap Shelf Reassignment & Learned Memory ---") clear_shopping_list() + # Ensure fresh test state by clearing mapping for test ingredient using execute_query + from app.database import execute_query + execute_query("DELETE FROM ingredient_category_mappings WHERE LOWER(ingredient_name) = LOWER(?)", ('frische petersilie',), commit=True) + item = add_shopping_item("Frische Petersilie", "1", "Bund") assert item["category"] == "Obst & Gemüse"