Add unit tests for submit, notify, and aggregate handlers
50 tests covering pricing pipeline (Decimal rounding, clamping, totals),
Google auth (enforcement, bypass prevention, audience/domain validation,
503 on outage), email slug generation, form status with reopen_at,
input validation, Slack failure resilience, reminder dedup guards,
order confirmation DMs, aggregated summaries, CSV generation, and
mrkdwn escaping.
2026-05-13 12:59:22 -04:00
|
|
|
"""Pytest configuration — add shared layer source to sys.path so handler imports resolve."""
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
# Add the shared layer source directory so `from shared.db import ...` works
|
|
|
|
|
# without requiring a real Lambda layer or .aws-sam build.
|
2026-05-13 13:25:40 -04:00
|
|
|
_shared_layer_dir = os.path.join(os.path.dirname(__file__), os.pardir, "src", "shared")
|
Add unit tests for submit, notify, and aggregate handlers
50 tests covering pricing pipeline (Decimal rounding, clamping, totals),
Google auth (enforcement, bypass prevention, audience/domain validation,
503 on outage), email slug generation, form status with reopen_at,
input validation, Slack failure resilience, reminder dedup guards,
order confirmation DMs, aggregated summaries, CSV generation, and
mrkdwn escaping.
2026-05-13 12:59:22 -04:00
|
|
|
sys.path.insert(0, os.path.abspath(_shared_layer_dir))
|