Public Access
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:
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "backend_tests_test_email_backend_py", "label": "test_email_backend.py", "file_type": "code", "source_file": "backend/tests/test_email_backend.py", "source_location": "L1"}, {"id": "test_email_backend_test_sendgrid_send_calls_api", "label": "test_sendgrid_send_calls_api()", "file_type": "code", "source_file": "backend/tests/test_email_backend.py", "source_location": "L5"}, {"id": "test_email_backend_test_sendgrid_raises_on_4xx", "label": "test_sendgrid_raises_on_4xx()", "file_type": "code", "source_file": "backend/tests/test_email_backend.py", "source_location": "L26"}, {"id": "test_email_backend_rationale_1", "label": "Unit tests for SendGridEmailBackend \u2014 no Postgres needed.", "file_type": "rationale", "source_file": "backend/tests/test_email_backend.py", "source_location": "L1"}], "edges": [{"source": "backend_tests_test_email_backend_py", "target": "pytest", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/tests/test_email_backend.py", "source_location": "L2", "weight": 1.0}, {"source": "backend_tests_test_email_backend_py", "target": "test_email_backend_test_sendgrid_send_calls_api", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_email_backend.py", "source_location": "L5", "weight": 1.0}, {"source": "backend_tests_test_email_backend_py", "target": "test_email_backend_test_sendgrid_raises_on_4xx", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_email_backend.py", "source_location": "L26", "weight": 1.0}, {"source": "test_email_backend_rationale_1", "target": "backend_tests_test_email_backend_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/tests/test_email_backend.py", "source_location": "L1", "weight": 1.0}], "raw_calls": [{"caller_nid": "test_email_backend_test_sendgrid_send_calls_api", "callee": "setattr", "source_file": "backend/tests/test_email_backend.py", "source_location": "L17"}, {"caller_nid": "test_email_backend_test_sendgrid_send_calls_api", "callee": "FakeClient", "source_file": "backend/tests/test_email_backend.py", "source_location": "L17"}, {"caller_nid": "test_email_backend_test_sendgrid_send_calls_api", "callee": "SendGridEmailBackend", "source_file": "backend/tests/test_email_backend.py", "source_location": "L20"}, {"caller_nid": "test_email_backend_test_sendgrid_send_calls_api", "callee": "send", "source_file": "backend/tests/test_email_backend.py", "source_location": "L21"}, {"caller_nid": "test_email_backend_test_sendgrid_send_calls_api", "callee": "len", "source_file": "backend/tests/test_email_backend.py", "source_location": "L23"}, {"caller_nid": "test_email_backend_test_sendgrid_raises_on_4xx", "callee": "setattr", "source_file": "backend/tests/test_email_backend.py", "source_location": "L35"}, {"caller_nid": "test_email_backend_test_sendgrid_raises_on_4xx", "callee": "FakeClient", "source_file": "backend/tests/test_email_backend.py", "source_location": "L35"}, {"caller_nid": "test_email_backend_test_sendgrid_raises_on_4xx", "callee": "SendGridEmailBackend", "source_file": "backend/tests/test_email_backend.py", "source_location": "L38"}, {"caller_nid": "test_email_backend_test_sendgrid_raises_on_4xx", "callee": "raises", "source_file": "backend/tests/test_email_backend.py", "source_location": "L39"}, {"caller_nid": "test_email_backend_test_sendgrid_raises_on_4xx", "callee": "send", "source_file": "backend/tests/test_email_backend.py", "source_location": "L40"}]}
|
||||
Reference in New Issue
Block a user