diff --git a/tests/test_thumbnail_tag.py b/tests/test_thumbnail_tag.py index f3bdfda6..adc7fb0b 100644 --- a/tests/test_thumbnail_tag.py +++ b/tests/test_thumbnail_tag.py @@ -1,4 +1,5 @@ import pytest +import re from django.template import TemplateSyntaxError from . import imagegenerators # noqa @@ -87,3 +88,11 @@ def test_alternate_generator(): clear_imagekit_cache() html = render_tag(ttag) assert html == '1' + + +def test_srcset_arg(): + ttag = r"""{% thumbnail '100x' img srcset="1.5 2" %}""" + clear_imagekit_cache() + html = render_tag(ttag) + srcset_regex = re.compile('srcset=".* 1x ,.* 1\\.5x ,.* 2.0x"') + assert srcset_regex.search(html) is not None