Skip to content

Dev#14

Open
jashan-786 wants to merge 97 commits into
mainfrom
dev
Open

Dev#14
jashan-786 wants to merge 97 commits into
mainfrom
dev

Conversation

@jashan-786
Copy link
Copy Markdown
Collaborator

No description provided.

nhannpl and others added 30 commits December 10, 2025 18:26
…update login to use email, auth schemas and password hashing.
feat: Implement bulk vital sign recording and dashboard summary endpo…
nhannpl and others added 29 commits January 14, 2026 12:33
…r, refined medical event constants, and centralized workflow orchestration.
… second notification and severity escalation to CRITICAL.
…l escalation override, and robust incident resolution with timer cleanup.
…Enums (CaregiverAction, ProfessionalAction), and finalize comprehensive test coverage.
…ev_router', and implement robust 'Time Travel' tests for workflow timeouts (Patient 30s confirmation).
…nt-initiated incident resolution by cancelling active timers
- Created docker-compose.test.yml for isolated test database (MongoDB 6.0 on port 27018)
- Updated conftest.py with dual-mode DB fixture (mock vs real via TEST_MODE env var)
- Migrated 3 livefeed test files to support both modes (22 tests total):
  * test_router_streams.py - Router/SSE endpoint tests
  * test_patient_workflow.py - Patient confirmation flow tests
  * test_caregiver_workflow.py - Caregiver escalation tests
- Added helper functions for dual-mode database operations:
  * get_alert_events() - Query events in both modes
  * get_incidents() - Query incidents in both modes
  * save_incident() - Save incidents in both modes
  * save_to_db() - Generic save for any collection
- All tests pass in both mock (0.5s) and real DB (1.6s) modes
- Zero impact on existing test suite (backward compatible)
- Added DB_MIGRATION_PROGRESS.md to track migration status
- Added dual-mode helpers (save_incident, get_alert_events)
- All 2 tests pass in both mock and real DB modes
- Professional workflow (Dispatcher/EMT) authorization and lifecycle tests now fully migrated
- No migration needed - already using proper async patterns
- All login, signup, and refresh token tests pass
- Total: 47 tests passing across livefeed + auth modules
- Documented all infrastructure changes
- Listed all 47 migrated/verified tests
- Included technical decisions and learnings
- Provided usage instructions and next steps
- Users module: 100% compatible (1 test)
- Caregivers module: 86% compatible (31/36 tests passing)
- Total: 87 tests passing in real DB mode
- 5 caregivers tests need migration work
…ting

- Established Docker-based test database infrastructure
- Implemented dual-mode test fixture with automatic cleanup
- Migrated 222 tests across 8 modules to support real MongoDB
- Verified 100% pass rate in both mock and real DB modes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants