Skip to content

Commit

Permalink
Address PR Review comments #38
Browse files Browse the repository at this point in the history
  • Loading branch information
asuresh-code committed Dec 13, 2024
1 parent e4ec480 commit 03f6736
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion object_storage_api/routers/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
11 changes: 2 additions & 9 deletions test/e2e/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 03f6736

Please sign in to comment.