diff --git a/tests/test_gallery.py b/tests/test_gallery.py index 61a5aca..da5640e 100644 --- a/tests/test_gallery.py +++ b/tests/test_gallery.py @@ -2,7 +2,6 @@ import datetime import logging import os from os.path import join -from urllib.parse import quote import pytest @@ -127,6 +126,25 @@ def test_media_iptc_override(settings): ) +def test_media_img_format(settings): + settings['img_format'] = 'jpeg' + m = Image('11.tiff', 'dir1/test1', settings) + path = join('dir1', 'test1') + thumb = join('thumbnails', '11.tn.jpeg') + + assert m.dst_filename == '11.jpeg' + assert m.src_path == join(settings['source'], path, '11.tiff') + assert m.dst_path == join(settings['destination'], path, '11.jpeg') + assert m.thumb_name == thumb + assert m.thumb_path == join(settings['destination'], path, thumb) + assert m.title == "Foo Bar" + assert m.description == "
This is a funny description of this image
" + + file_path = join(path, '11.tiff') + assert repr(m) == f"