[Vehicles] - Implement CRUD Operations to Pass Tests #104

Closed
opened 2025-11-03 17:46:42 +00:00 by GFMpt13 · 0 comments
GFMpt13 commented 2025-11-03 17:46:42 +00:00 (Migrated from github.com)

Fill in the logic for the interface methods created in the first sub-issue until all tests written in the second sub-issue pass.

Tasks:

  • Implement create_vehicle (using Vehicle(**data).save()).
  • Implement get_vehicle_by_id (using Vehicle.get()).
  • Implement get_vehicle_by_license_plate (using Vehicle.find_one(Vehicle.license_plate == ...)).
  • Implement get_vehicles_by_client_id (using Vehicle.find(Vehicle.client_id == ...).to_list()).
  • Implement update_vehicle (finding the vehicle, applying updates, and saving).
  • Implement delete_vehicle (finding the vehicle and calling delete()).
  • Run pytest and confirm all tests now pass.
Fill in the logic for the interface methods created in the first sub-issue until all tests written in the second sub-issue pass. **Tasks:** - [ ] Implement `create_vehicle` (using `Vehicle(**data).save()`). - [ ] Implement `get_vehicle_by_id` (using `Vehicle.get()`). - [ ] Implement `get_vehicle_by_license_plate` (using `Vehicle.find_one(Vehicle.license_plate == ...)`). - [ ] Implement `get_vehicles_by_client_id` (using `Vehicle.find(Vehicle.client_id == ...).to_list()`). - [ ] Implement `update_vehicle` (finding the vehicle, applying updates, and saving). - [ ] Implement `delete_vehicle` (finding the vehicle and calling `delete()`). - [ ] Run `pytest` and confirm all tests now pass.
Sign in to join this conversation.
No description provided.