feat: Zutaten im Listendialog dem BLS zuordnen
Deploy Development / deploy (push) Successful in 59s
Build Test / pytest-backend (push) Successful in 4s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 23s

Mapping-Status pro Zutat, Suche zuerst Listen und eigene Foods.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-09-13 14:38:42 +02:00
1 parent b37005be01
commit a5adff6196
10 files changed
+237 -23

No files matched your search

+21 -1
View File
@@ -1,4 +1,24 @@
from data_layer.food_recipes import save_recipe
from data_layer.food_recipes import list_known_ingredient_names, save_recipe
class _FakeCur:
def __init__(self, rows):
self.rows = rows
def execute(self, sql, params=None):
return None
def fetchall(self):
return self.rows
def test_known_ingredient_names_flags_mapping():
rows = list_known_ingredient_names(_FakeCur([
{"source_name_raw": "Hafer", "source_name_normalized": "hafer", "food_id": "1", "food_name_de": "Haferflocken", "bls_code": "B123", "mapped": True},
{"source_name_raw": "Salz", "source_name_normalized": "salz", "food_id": None, "food_name_de": None, "bls_code": None, "mapped": False},
]), "p")
assert rows[0]["mapped"] is True
assert rows[1]["mapped"] is False
def test_save_recipe_requires_name():