SurfSense/surfsense_backend/tests/unit
CREDO23 353755fd73 test(automations): cross-cutting registries, enums, side-effects + shared fixtures
Top-level tests that span multiple submodules:

- test_stores.py (7): the trigger + action registry contracts — register
  round-trip, unknown type → None (not raise), duplicate registration
  rejected, defensive snapshot from all_*.
- test_definition_types.py (2): params_schema property on both
  ActionDefinition and TriggerDefinition reflects the Pydantic model.
- test_persistence_enums.py (3): exact string values + member sets of
  AutomationStatus / RunStatus / TriggerType — the postgres-mirrored
  contract that breaks stored rows if drifted.
- test_import_registrations.py (2): the bundled agent_task action and
  schedule trigger self-register on package import (canary for the
  side-effect import chain).

conftest.py adds isolated_action_registry / isolated_trigger_registry
fixtures: snapshot + restore of the module-level _REGISTRY dicts so
tests that add their own definitions don't leak across the suite.

14 tests, pure unit.
2026-05-28 19:03:55 +02:00
..
adapters test: bootstrap pytest environment for backend 2026-02-24 18:19:56 +02:00
agents feat(agents): emit metrics for model and tool calls 2026-05-21 23:02:36 +05:30
automations test(automations): cross-cutting registries, enums, side-effects + shared fixtures 2026-05-28 19:03:55 +02:00
connector_indexers Fix test mocks for vision_llm kwarg 2026-04-10 18:20:49 +02:00
connectors chore: ran linting 2026-04-07 05:55:39 +05:30
db feat: improved agent streaming 2026-04-29 07:20:31 -07:00
e2e_fakes test(backend): enhance Drive file filtering and add unit tests for _drive_list_files 2026-05-06 17:58:58 +05:30
etl_pipeline chore: linting 2026-05-15 17:33:44 -07:00
google_unification chore: ran linting 2026-05-09 05:28:09 +05:30
indexing_pipeline Merge remote-tracking branch 'upstream/dev' into fix/backend-tests 2026-05-16 19:40:01 +05:30
middleware fix(test): pin enable_kb_planner_runnable=false for KB-search planner tests 2026-05-05 02:00:34 +02:00
observability feat(env): add SURFSENSE_ENV variable for deployment environment and update observability resource attributes 2026-05-23 02:13:24 +05:30
routes feat: fixed vision/image provider specific errors and fixed podcast/video streaming 2026-05-02 19:18:53 -07:00
services feat: add no-update sentinel handling to save_memory function and corresponding unit tests 2026-05-20 15:03:35 +05:30
tasks test(chat): add parity tests for streaming/flows/ parallel refactor 2026-05-25 21:50:18 +02:00
utils test(backend): add OAuth state security unit tests 2026-05-06 17:18:31 +05:30
__init__.py test: bootstrap pytest environment for backend 2026-02-24 18:19:56 +02:00
test_error_contract.py chore: linting 2026-04-22 01:05:31 -07:00
test_obsidian_plugin_indexer.py chore: linting 2026-04-27 14:04:50 -07:00
test_stream_new_chat_contract.py perf(chat): kill auto-pin preflight + speculative build, rely on reactive 429 recovery 2026-05-20 11:03:08 +02:00