SurfSense/surfsense_backend/tests/unit/automations/dispatch
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
..
__init__.py test(automations/dispatch): lock _validate_inputs + DispatchError 2026-05-28 19:03:00 +02:00
test_errors.py test(automations/dispatch): lock _validate_inputs + DispatchError 2026-05-28 19:03:00 +02:00
test_validate_inputs.py test(automations/dispatch): lock _validate_inputs + DispatchError 2026-05-28 19:03:00 +02:00