Fix test cleanup in test_walking_path_and_presets for MariaDB backend
This commit is contained in:
@@ -70,6 +70,10 @@ def run_tests():
|
|||||||
|
|
||||||
print("--- 4. Testing 1-Tap Shelf Reassignment & Learned Memory ---")
|
print("--- 4. Testing 1-Tap Shelf Reassignment & Learned Memory ---")
|
||||||
clear_shopping_list()
|
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")
|
item = add_shopping_item("Frische Petersilie", "1", "Bund")
|
||||||
assert item["category"] == "Obst & Gemüse"
|
assert item["category"] == "Obst & Gemüse"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user