Skip to content

Commit

Permalink
Update test_doc_parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JSv4 authored Oct 23, 2024
1 parent 3596e35 commit 5d4948d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions opencontractserver/tests/test_doc_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ def create_mock_image(self, width: int, height: int) -> Image.Image:
"""Create a mock image with the given dimensions."""
return Image.new("RGB", (width, height), color="red")

def image_to_bytes(self, image: Image.Image) -> bytes:
"""Convert a PIL Image to bytes."""
img_byte_arr = io.BytesIO()
image.save(img_byte_arr, format="PNG")
return img_byte_arr.getvalue()

@patch("opencontractserver.tasks.doc_tasks.convert_from_bytes")
def test_pdf_thumbnail_extraction(self, mock_convert_from_bytes):
"""Test PDF thumbnail extraction with various image sizes and orientations."""
Expand Down

0 comments on commit 5d4948d

Please sign in to comment.