Skip to content

Commit

Permalink
Testing if test definition fails at github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
anishTP committed Nov 16, 2023
1 parent 59f7b5b commit b81bc89
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/unit/views/preview_image_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import io

import pytest
from io import BytesIO
from magic import from_buffer
from PIL import Image

Expand All @@ -15,11 +14,9 @@ def test_preview_image_jobs(project_expo2011) -> None:


@pytest.mark.usefixtures('project_expo2011', 'all_fixtures')
def test_preview_image_size(project_expo2011) -> None:
def test_preview_image_size_mimeytpe(project_expo2011) -> None:
render_project_preview_image(project_id=project_expo2011.id)
with Image.open(io.BytesIO(project_expo2011.preview_image)) as preview_image:
with Image.open(BytesIO(project_expo2011.preview_image)) as preview_image:
assert preview_image.size == (1280, 720)
image_mimetype = from_buffer(
io.BytesIO(project_expo2011.preview_image).read(2048), mime=True
)
image_mimetype = from_buffer(BytesIO(project_expo2011.preview_image).read(2048), mime=True)
assert image_mimetype == 'image/png'

0 comments on commit b81bc89

Please sign in to comment.