Fix test cleanup in test_walking_path_and_presets for MariaDB backend

This commit is contained in:
2026-10-20 17:45:53 +02:00
parent 325b2ccccf
commit 42f3de191c
+4
View File
@@ -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"