SurfSense/surfsense_backend/tests/unit/automations
CREDO23 822940b09e test(automations/schemas): lock definition + api validation gates
definition/ (29 tests): the envelope (defaults, extra=forbid, empty
plan/name rejection), Inputs schema-alias roundtrip (Python schema_ ↔
wire schema), PlanStep numeric bounds + addressing-field constraints,
Execution production defaults stability (10-min timeout, 2 retries,
exponential backoff, drop_if_running) + closed-set Literal gates,
Metadata's exceptional extra="allow" contract, and TriggerSpec type
requirement.

api/ (9 tests): AutomationCreate/Update cascade-validate into the
nested definition, reject unknown payload fields, enforce name length;
TriggerCreate exposes safe defaults (enabled=True, params={},
static_inputs={}) and rejects unknown TriggerType strings at the
boundary.

All pure unit, no DB.
2026-05-28 19:03:42 +02:00
..
actions test(automations/actions): lock agent_task helpers (auto_decide + finalize) 2026-05-28 19:03:29 +02:00
dispatch test(automations/dispatch): lock _validate_inputs + DispatchError 2026-05-28 19:03:00 +02:00
runtime test(automations/runtime): lock execute_step + with_retries 2026-05-28 19:03:08 +02:00
schemas test(automations/schemas): lock definition + api validation gates 2026-05-28 19:03:42 +02:00
templating test(automations/templating): lock render, filters, environment, context 2026-05-28 19:03:22 +02:00
triggers test(automations/triggers): lock schedule cron + params 2026-05-28 19:02:52 +02:00