From 03f6736ddc5c84b5246f6a448b15f44bae9e132a Mon Sep 17 00:00:00 2001 From: Anikesh Suresh Date: Fri, 13 Dec 2024 10:03:45 +0000 Subject: [PATCH] Address PR Review comments #38 --- object_storage_api/routers/image.py | 2 +- test/e2e/test_image.py | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/object_storage_api/routers/image.py b/object_storage_api/routers/image.py index e5c0e05..4ed6e6e 100644 --- a/object_storage_api/routers/image.py +++ b/object_storage_api/routers/image.py @@ -83,7 +83,7 @@ def get_image( @router.delete( path="/{image_id}", summary="Delete an image by ID", - response_description="Image deleted sucessfully", + response_description="Image deleted successfully", status_code=status.HTTP_204_NO_CONTENT, ) def delete_image( diff --git a/test/e2e/test_image.py b/test/e2e/test_image.py index 204f9d8..a4d7050 100644 --- a/test/e2e/test_image.py +++ b/test/e2e/test_image.py @@ -324,19 +324,12 @@ def delete_image(self, image_id: str) -> None: self._delete_response_image = self.test_client.delete(f"/images/{image_id}") def check_delete_image_success(self) -> None: - """Checks that a prior call to `delete_image` gave a successful response with the expected data - returned.""" + """Checks that a prior call to `delete_image` gave a successful response with the expected code.""" assert self._delete_response_image.status_code == 204 def check_delete_image_failed_with_detail(self) -> None: - """ - Checks that a prior call to `delete_image` gave a failed response with the expected code and - error message. - - :param status_code: Expected status code of the response. - :param detail: Expected detail given in the response. - """ + """Checks that a prior call to `delete_image` gave a failed response with the expected code and error message.""" assert self._delete_response_image.status_code == 404 assert self._delete_response_image.json()["detail"] == "Image not found"