meal-order-manager/tests
Adam Moussa 44b21f4033
Some checks failed
Deploy / deploy (push) Has been cancelled
fix(test): fix aggregated notifier tests + enable CI test suite (INFRA-72) (#39)
* fix(test): mock get_settings/get_roster in aggregated tests + enable CI tests (INFRA-72)

handle_orders_aggregated now delivers the summary via admin DMs (PR #15),
adding get_settings/get_roster calls the aggregated tests never mocked, so
they hit live DynamoDB. Mock both and assert the message content on the
send_dm path. Set run-tests: true so the suite actually runs in CI.

* fix(test): default AWS region in conftest so CI collection doesn't hit NoRegionError (INFRA-72)

Handlers build boto3 clients at module load; CI runners have no AWS config,
so test collection raised NoRegionError once the suite actually ran. Set a
region default before imports (offline client construction; calls are mocked).

* fix(test): add repo root to sys.path so CI's bare pytest collects functions.* (INFRA-72)

test_aggregate_orders imports functions.aggregate_orders.handler, which needs
the repo root on sys.path. python -m pytest injects CWD automatically but CI
runs pytest directly, so these 11 tests errored at collection in CI only.
2026-07-08 16:33:42 -04:00
..
conftest.py fix(test): fix aggregated notifier tests + enable CI test suite (INFRA-72) (#39) 2026-07-08 16:33:42 -04:00
test_admin_authorizer.py Add gateway-level authorizer to admin API (INFRA-100) (#24) 2026-06-08 18:05:09 -04:00
test_aggregate_orders.py Add weekly summary PDF and admin order-list download (#16) (#17) 2026-06-01 18:49:58 -04:00
test_close_form.py Add discount pricing, Google auth, and order hardening (#10) 2026-05-13 18:00:21 -04:00
test_pdf.py Add weekly summary PDF and admin order-list download (#16) (#17) 2026-06-01 18:49:58 -04:00
test_secrets.py Add discount pricing, Google auth, and order hardening (#10) 2026-05-13 18:00:21 -04:00
test_slack_notifier.py fix(test): fix aggregated notifier tests + enable CI test suite (INFRA-72) (#39) 2026-07-08 16:33:42 -04:00
test_submit_order.py Harden summary-PDF endpoint per cross-review 2026-06-05 18:44:25 -04:00