[Vehicles] - Write Failing DB Tests for CRUD Operations #103
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#103
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?
Following TDD, write tests before implementation. These tests will fail, as the interface methods are empty.
Tasks:
pytestfile (e.g.,tests/test_vehicle_repo.py).clientfixture, a samplevehiclefixture).test_create_vehicle_success.test_create_vehicle_duplicate_license_plate_fails(to test the unique index).test_get_vehicle_by_id_success.test_get_vehicle_by_id_not_found.test_get_vehicle_by_license_plate_success.test_get_vehicles_by_client_id_returns_list.test_update_vehicle_success(e.g., updatingkilometers).test_delete_vehicle_success.pytestand confirm all new tests fail as expected.