SurfSense/surfsense_backend/tests/unit/automations
CREDO23 acbeb60a43 test(automations/actions): lock agent_task helpers (auto_decide + finalize)
auto_decide.build_auto_decisions (3): produces one decision per
action_request entry, defaults to one decision for legacy scalar
interrupts, and skips malformed interrupts silently so a misbehaving
tool can't take down the whole agent_task step.

finalize.extract_final_assistant_message (4): string-content AIMessage
returned verbatim, list-of-parts content concatenated (skipping
non-text parts like tool_use), walks back past trailing ToolMessages
to find the last AIMessage, and returns None when no extractable text
is present (so callers can branch on silence vs. empty).

7 tests, pure unit.
2026-05-28 19:03:29 +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
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