unit-test-Backend-API-Routes
requested to merge test/unit-test-Backend-API-Routes-Schemas/koushik into unit_test-API-routes-Schemas
- Clear Description: This MR adds comprehensive unit tests covering core authentication, RBAC, and critical API routes to improve reliability and prevent regressions.
What’s Covered
- Auth token creation & validation
- Role-based access control enforcement
- Health and root endpoints
- CRUD and permission checks for Users, Patients, Doctors, Consultations, Queues, Medicines, and Medical Camps
- Queue state transition validation Testing Approach
- Mocked DB and auth dependencies via conftest.py
- Role-based test cases (Admin, Doctor, Patient)
- Isolated test database (SQLite in-memory)
This ensures consistent behavior across routes and validates edge cases like invalid transitions and unauthorized access.
-
Checklist: A checklist of completed tasks, such as:
-
Code follows project API guidelines (if applicable). -
Tests are included and passing. -
Documentation is updated (if applicable). -
Code adheres to project coding standards.
-
- Related Issue(s): Link to any relevant issues using Closes #23 (closed)
Edited by Banuri Koushik Reddy