[Appointments] Test Setup (Mock) #186
Labels
No labels
CI/CD
MongoDB
PostgreSQL
api
authentication
bug
documentation
duplicate
enhancement
example issue
fix
good first issue
help wanted
high-level requirement
infrastructure
invalid
low-level requirement
medium-level requirement
question
security
test
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AndreFerreira5/starranja#186
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create
tests/test_routes/test_appointments.py.Configure
AsyncMockforAppointmentRepo.Test Create:
test_create_appointment_success(201 Created).test_create_appointment_client_not_found(Mock repo raisingHTTPException(404), expect 404).Test Read:
test_get_appointment_by_id_success(200 OK).test_get_appointment_by_id_not_found(Mock repo returningNone, expect 404).test_get_all_appointments(200 OK - Note: Your repo currently doesn't have aget_all, so maybe skip or implementget_appointments_by_client_id).Test Read (Filters):
test_get_appointments_by_client(Mockrepo.get_appointments_by_client_id, expect 200).test_get_appointments_by_vehicle(Mockrepo.get_appointments_by_vehicle_id, expect 200).Test Update:
test_update_appointment_success(200 OK).test_update_appointment_not_found(Expect 404).Test Delete:
test_delete_appointment_success(204 No Content).test_delete_appointment_not_found(Expect 404).