feat: Listen-Tab und sichtbare Zutatenlisten-Verwaltung
Listen anlegen, bearbeiten und importieren liegt unter Ernährung. Tagebuchzeilen werden auch mit Mengen-Prefix verknüpft. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3b46630a37
commit
b37005be01
12 files changed
+307
-73
No files matched your search
@@ -7,6 +7,7 @@ from data_layer.food_mapping import (
|
||||
list_quantity_units,
|
||||
list_unmapped_payload,
|
||||
merge_unmapped_rows,
|
||||
names_match_list,
|
||||
normalize_food_name,
|
||||
parse_quantity,
|
||||
parse_quantity_g,
|
||||
@@ -104,6 +105,7 @@ def test_fetch_unmapped_keeps_ingredient_dates_and_skips_mapped():
|
||||
cur = _FakeCur([
|
||||
[{"source_name_normalized": "haferflocken"}],
|
||||
[],
|
||||
[],
|
||||
[
|
||||
{
|
||||
"source_name_raw": "Salz",
|
||||
@@ -129,8 +131,15 @@ def test_fetch_unmapped_keeps_ingredient_dates_and_skips_mapped():
|
||||
assert rows[0]["kind"] == "recipe_ingredient"
|
||||
|
||||
|
||||
def test_list_name_matches_despite_quantity_prefix():
|
||||
assert names_match_list("50 g Müsli Mix", "50 g müsli mix", "müsli mix")
|
||||
assert names_match_list("Müsli Mix", "müsli mix", "müsli mix")
|
||||
assert not names_match_list("Haferflocken", "haferflocken", "müsli mix")
|
||||
|
||||
|
||||
def test_unmapped_meta_includes_recent_ingredients():
|
||||
batches = [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[{
|
||||
|
||||
Reference in new issue
Block a user