1
0
Fork 0

Merge pull request #2547 from avandeursen/docker-test-run

Ensure django tests pass in default Docker setting
This commit is contained in:
Mouse Reeve 2023-01-09 20:06:39 -08:00 committed by GitHub
commit c9fa90f83b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -2,6 +2,8 @@
from io import BytesIO
import pathlib
import pytest
from dateutil.parser import parse
from PIL import Image
from django.core.files.base import ContentFile
@ -10,6 +12,7 @@ from django.utils import timezone
from bookwyrm import models, settings
from bookwyrm.models.book import isbn_10_to_13, isbn_13_to_10
from bookwyrm.settings import ENABLE_THUMBNAIL_GENERATION
class Book(TestCase):
@ -101,6 +104,10 @@ class Book(TestCase):
self.first_edition.save()
self.assertEqual(self.first_edition.edition_rank, 1)
@pytest.mark.skipif(
not ENABLE_THUMBNAIL_GENERATION,
reason="Thumbnail generation disabled in settings",
)
def test_thumbnail_fields(self):
"""Just hit them"""
image_file = pathlib.Path(__file__).parent.joinpath(