diff --git a/ultimatethumb/templatetags/ultimatethumb_tags.py b/ultimatethumb/templatetags/ultimatethumb_tags.py index aae6ca8..613f278 100644 --- a/ultimatethumb/templatetags/ultimatethumb_tags.py +++ b/ultimatethumb/templatetags/ultimatethumb_tags.py @@ -46,3 +46,4 @@ def ultimatethumb( thumbnail_options['pngquant'] = pngquant context[as_var] = ThumbnailSet(source, sizes, thumbnail_options).thumbnails + return '' diff --git a/ultimatethumb/tests/test_templatetags.py b/ultimatethumb/tests/test_templatetags.py index 5885b3e..8c4f4c4 100644 --- a/ultimatethumb/tests/test_templatetags.py +++ b/ultimatethumb/tests/test_templatetags.py @@ -16,7 +16,7 @@ def test_no_source(self, settings): ) % 'static:notexist.file') context = Context() - template.render(context) + assert template.render(context) == '' assert context['img'] is None @@ -28,7 +28,7 @@ def test_invalid_source(self, settings): ) % 'static:test.txt') context = Context() - template.render(context) + assert template.render(context) == '' assert context['img'] is None @@ -40,7 +40,7 @@ def test_static_source(self, settings): ) % 'static:50x50-placeholder.png') context = Context() - template.render(context) + assert template.render(context) == '' assert context['img'][0].source == os.path.join( settings.STATICFILES_DIRS[0], '50x50-placeholder.png') @@ -54,7 +54,7 @@ def test_path_source(self, settings): ) % source.file.path) context = Context() - template.render(context) + assert template.render(context) == '' assert context['img'][0].source == os.path.join( settings.MEDIA_ROOT, source.file.name) @@ -68,7 +68,7 @@ def test_media_source(self, settings): ) % source.file.name) context = Context() - template.render(context) + assert template.render(context) == '' assert context['img'][0].source == os.path.join( settings.MEDIA_ROOT, source.file.name) @@ -82,7 +82,7 @@ def test_crop(self): ) % source.file.path) context = Context() - template.render(context) + assert template.render(context) == '' assert 'img' in context assert len(context['img']) == 1 @@ -97,7 +97,7 @@ def test_quality(self): ) % source.file.path) context = Context() - template.render(context) + assert template.render(context) == '' assert 'img' in context assert len(context['img']) == 1 @@ -112,7 +112,7 @@ def test_pngquant(self): ) % source.file.path) context = Context() - template.render(context) + assert template.render(context) == '' assert 'img' in context assert len(context['img']) == 1 @@ -127,7 +127,7 @@ def test_oversize(self): ) % source.file.path) context = Context() - template.render(context) + assert template.render(context) == '' assert 'img' in context assert len(context['img']) == 3 @@ -147,7 +147,7 @@ def test_oversize_upscale(self): ) % source.file.path) context = Context() - template.render(context) + assert template.render(context) == '' assert 'img' in context assert len(context['img']) == 4 @@ -169,7 +169,7 @@ def test_retina(self): ) % source.file.path) context = Context() - template.render(context) + assert template.render(context) == '' assert 'img' in context assert len(context['img']) == 2 @@ -191,7 +191,7 @@ def test_retina_disabled(self): ) % source.file.path) context = Context() - template.render(context) + assert template.render(context) == '' assert 'img' in context assert len(context['img']) == 3