Phase 3: Routes and Authentication (JSON only)
Parent: #424
Status
Tasks (Completed)
Test Isolation Issues (Follow-up Required)
The contract tests in tests/contract/test_audit_traces.py pass individually but have data persistence issues when run as a suite:
Root Cause: Tests share ServiceManager instance which means storage data persists between test classes.
Symptoms:
- Tests pass when run individually
- Tests fail when run as a suite due to unexpected data from previous test classes
Proposed Solutions:
-
Add reset_test_data() calls - Add a tearDown() method to each test class that calls self.services.reset_test_data() to clear storage between test runs.
-
Use non-shared instances - Create fresh ServiceManager instances per test class using services.create_service_manager(shared=False) instead of sharing the global instance.
-
Data cleanup in fixtures - Ensure each test explicitly cleans up its own test data.
Status: Contract tests cover all endpoints and verify correct behavior. Test isolation is a quality-of-life improvement for the development workflow but does not affect the correctness of the implementation.
Out of Scope (Split to Separate Issue)
Acceptance Criteria
References
Phase 3: Routes and Authentication (JSON only)
Parent: #424
Status
Tasks (Completed)
Test Isolation Issues (Follow-up Required)
The contract tests in tests/contract/test_audit_traces.py pass individually but have data persistence issues when run as a suite:
Root Cause: Tests share
ServiceManagerinstance which means storage data persists between test classes.Symptoms:
Proposed Solutions:
Add
reset_test_data()calls - Add atearDown()method to each test class that callsself.services.reset_test_data()to clear storage between test runs.Use non-shared instances - Create fresh
ServiceManagerinstances per test class usingservices.create_service_manager(shared=False)instead of sharing the global instance.Data cleanup in fixtures - Ensure each test explicitly cleans up its own test data.
Status: Contract tests cover all endpoints and verify correct behavior. Test isolation is a quality-of-life improvement for the development workflow but does not affect the correctness of the implementation.
Out of Scope (Split to Separate Issue)
Acceptance Criteria
References