SurfSense/surfsense_backend/tests/unit/automations
CREDO23 18b4800e49 test(automations/dispatch): lock _validate_inputs + DispatchError
Cover the input-validation contract dispatch_run relies on:

- no declared schema → inputs pass through unchanged (regression site
  that previously stripped runtime keys like fired_at / last_fired_at
  and broke Jinja templates).
- declared schema, valid inputs → passthrough validated.
- declared schema, invalid inputs → DispatchError (uniform exception
  type, not raw jsonschema.ValidationError).

Plus the DispatchError exception identity (Exception subclass, message
preserved, isinstance-friendly for the dispatch layer's consumers).

4 tests, pure unit.
2026-05-28 19:03:00 +02:00
..
dispatch test(automations/dispatch): lock _validate_inputs + DispatchError 2026-05-28 19:03:00 +02:00
triggers test(automations/triggers): lock schedule cron + params 2026-05-28 19:02:52 +02:00