def test_rental_delete_by_id(self): rental = RentalModel(rental_schema.load(self.rental1)) rental.save() res = RentalService.delete_by_id(1234) self.assertEqual(res.status_code, 404) res = RentalService.delete_by_id(1) self.assertEqual(res.status_code, 204)
def delete(self, rental_id: int): """Delete Rental""" return RentalService.delete_by_id(rental_id)