Skip to content

src/dazzle_back/runtime/test_routes.py

Generated: 2026-03-30T04:38:48.596260+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Test routes for E2E testing.

Provides /test/* endpoints for seeding fixtures, resetting data, and capturing database snapshots.

These endpoints are only available when test mode is enabled. When DAZZLE_TEST_SECRET is set, all routes require the X-Test-Secret header to match (#458).

Key Exports

  • _EntitySQL
  • FixtureData
  • SeedRequest
  • SeedResponse
  • SnapshotResponse
  • AuthenticateRequest
  • AuthenticateResponse
  • _TestDeps
  • create_test_routes
  • seed
  • reset
  • snapshot
  • authenticate
  • entity_data
  • entity_count
  • entity_delete

Dependencies

Imports

  • __future__.annotations
  • json
  • logging
  • os
  • re
  • dataclasses.dataclass
  • pathlib.Path
  • typing.Any
  • pydantic.BaseModel
  • dazzle_back.runtime._fastapi_compat.FASTAPI_AVAILABLE
  • dazzle_back.runtime._fastapi_compat.APIRouter
  • dazzle_back.runtime._fastapi_compat.Depends
  • dazzle_back.runtime._fastapi_compat.HTTPException
  • dazzle_back.runtime._fastapi_compat.Request
  • dazzle_back.runtime.repository.DatabaseManager
  • dazzle_back.runtime.repository.Repository
  • dazzle_back.specs.entity.EntitySpec
  • uuid
  • uuid
  • starlette.responses.JSONResponse

Event Interactions

None detected.

Invariants and Assumptions

  • Validates: Invalid entity name:

Tests

  • tests/unit/test_runtime_test_routes.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_services.py
  • tests/unit/test_runtime_mcp_tools.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.