feat: Rezepte beim Zuordnen anlegen und offene Zutaten listen
Lebensmittel oder Rezept wählbar; gemappte Zutaten werden übernommen, offene erscheinen in der Liste. Dazu Fettgehalt-Suche, EPA-Stoffe, Rezept-CRUD und Wechsel bestehender Zuordnungen. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
132a364a3a
commit
a7e5511039
26 files changed
+1234
-147
No files matched your search
@@ -1,5 +1,9 @@
|
||||
from decimal import Decimal
|
||||
from uuid import uuid4
|
||||
|
||||
from data_layer.food_knowledge import (
|
||||
BUNDLE_FORMAT,
|
||||
_jsonable,
|
||||
parse_food_knowledge_bundle,
|
||||
portable_mapping,
|
||||
)
|
||||
@@ -40,3 +44,14 @@ def test_portable_mapping_drops_ids():
|
||||
assert "food_id" not in row
|
||||
assert row["bls_code"] == "C131000"
|
||||
assert row["source_name_raw"] == "Haferflocken, Großblatt"
|
||||
|
||||
|
||||
def test_jsonable_export_types():
|
||||
payload = _jsonable({
|
||||
"grams": Decimal("1.50"),
|
||||
"id": uuid4(),
|
||||
"nested": [Decimal("2")],
|
||||
})
|
||||
assert isinstance(payload["grams"], float)
|
||||
assert isinstance(payload["id"], str)
|
||||
assert payload["nested"] == [2.0]
|
||||
Reference in new issue
Block a user