Tests
Tests
This repository has a large and valuable regression suite. The wiki should point to the test families that prove the behavior documented elsewhere.
Major evidence clusters
Authentication and tenancy
tests/unit/auth/test_auth.pytests/unit/auth/test_login_throttle.pytests/unit/auth/test_ms_tenant_org.pytests/unit/auth/test_auth_and_tenancy_contracts.pytests/integration/test_authentication.py
These suites are the best evidence for login, token refresh, Microsoft auth, tenant creation, and membership coupling.
Document processing
api/tests/test_document_edit_audit.pyapi/tests/test_edit_history.pytests/integration/test_document_processing.pytests/integration/test_async_document_processing.pytests/unit/processing/test_upload_validation.pytests/unit/processing/test_document_classification_toggle.py
These suites cover upload validation, async task behavior, edit diffs, edit-history persistence, and status semantics.
Schema management
tests/unit/schema/test_schema_generator.pytests/unit/schema/test_schema_import_export.pytests/unit/schema/test_schema_versioning.pytests/unit/schema/test_schema_generator_endpoints.pytests/integration/test_schema_selection_integration.py
These suites prove schema CRUD, generation, import/export, and route behavior.
File management, storage, and serving
tests/integration/test_file_management.pytests/unit/storage/test_azure_storage.pytests/unit/storage/test_virus_scan_integration.pytests/unit/misc/test_upload_config.py
These suites verify upload constraints, storage abstraction behavior, and file-handling configuration.
Billing, logs, chatbot, and security
tests/integration/test_chatbot.pytests/integration/test_health.pytests/unit/api/test_csp.py- activity-log and billing tests under
tests/unitandtests/integration
Validation strategy
Prefer the narrowest suite that proves the changed invariant:
- route shape change → endpoint-focused unit or integration test
- service behavior change → service unit test
- upload/processing workflow change → document-processing integration test
- auth or tenancy change → auth/tenant contract tests
Reserve a broad integration run for changes that cross multiple subsystems or when the narrow suite reveals a contract break.
Scope boundary
This page is a navigation aid. For the behavior behind the tests, read the relevant subsystem page.