tests: fix suite-wide collection and failures

- config: switch Settings to ConfigDict(extra='ignore') so extra env vars
  (spoonacular_api_key, SWIFTLY_BEARER_TOKEN) don't crash import.
  Remove deprecated class Config.
- email: wrap SendGrid imports in try/except so the module loads without
  the optional dependency. Update test_email_backend to patch Mail/RepyTo.
- planner_select: default PlannerConfig.set_size=21 (3 meals/day × 7) is
  way too large for the unit test assertion that checks 3-recipe diversity.
  Introduced _CFG_3 with set_size=3 and applied to all tests.
- Delete stale test_matcher.py importing removed functions.

Full suite: 46 passed, 74 skipped (Postgres), 0 failed, 120 collected.
This commit is contained in:
2026-05-18 17:43:30 -07:00
parent e92cc3a074
commit 019f9020ad
126 changed files with 34699 additions and 77 deletions
@@ -0,0 +1 @@
{"nodes": [{"id": "backend_tests_test_ingredient_schema_py", "label": "test_ingredient_schema.py", "file_type": "code", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L1"}, {"id": "test_ingredient_schema_test_ingredient_create_normalizes_aliases", "label": "test_ingredient_create_normalizes_aliases()", "file_type": "code", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L7"}, {"id": "test_ingredient_schema_test_ingredient_match_read_round_trip", "label": "test_ingredient_match_read_round_trip()", "file_type": "code", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L18"}], "edges": [{"source": "backend_tests_test_ingredient_schema_py", "target": "decimal", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L1", "weight": 1.0}, {"source": "backend_tests_test_ingredient_schema_py", "target": "uuid", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L2", "weight": 1.0}, {"source": "backend_tests_test_ingredient_schema_py", "target": "app_schemas_ingredient", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L4", "weight": 1.0}, {"source": "backend_tests_test_ingredient_schema_py", "target": "test_ingredient_schema_test_ingredient_create_normalizes_aliases", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L7", "weight": 1.0}, {"source": "backend_tests_test_ingredient_schema_py", "target": "test_ingredient_schema_test_ingredient_match_read_round_trip", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L18", "weight": 1.0}], "raw_calls": [{"caller_nid": "test_ingredient_schema_test_ingredient_create_normalizes_aliases", "callee": "IngredientCreate", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L8"}, {"caller_nid": "test_ingredient_schema_test_ingredient_match_read_round_trip", "callee": "uuid4", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L19"}, {"caller_nid": "test_ingredient_schema_test_ingredient_match_read_round_trip", "callee": "uuid4", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L20"}, {"caller_nid": "test_ingredient_schema_test_ingredient_match_read_round_trip", "callee": "uuid4", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L22"}, {"caller_nid": "test_ingredient_schema_test_ingredient_match_read_round_trip", "callee": "Decimal", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L25"}, {"caller_nid": "test_ingredient_schema_test_ingredient_match_read_round_trip", "callee": "Decimal", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L28"}, {"caller_nid": "test_ingredient_schema_test_ingredient_match_read_round_trip", "callee": "Decimal", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L29"}, {"caller_nid": "test_ingredient_schema_test_ingredient_match_read_round_trip", "callee": "model_validate", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L32"}, {"caller_nid": "test_ingredient_schema_test_ingredient_match_read_round_trip", "callee": "Decimal", "source_file": "backend/tests/test_ingredient_schema.py", "source_location": "L33"}]}