Permalink
Browse files

update tests

  • Loading branch information...
1 parent 7c5ce08 commit cb3c69b9dec65d9feb82751dc3b49ab8a26077b4 @Alerion Alerion committed Apr 25, 2012
Showing with 10 additions and 0 deletions.
  1. +1 −0 tests/thumbnail_tests/templates/thumbnail20a.html
  2. +9 −0 tests/thumbnail_tests/tests.py
@@ -0,0 +1 @@
+{% load thumbnail %}<img src="{% thumbnail image "32x32" crop="center" %}">
@@ -267,6 +267,15 @@ def test_abspath(self):
im = self.backend.get_thumbnail(image, '32x32', crop='center')
self.assertEqual('<img src="%s">' % im.url, val)
+ def test_new_tag_style(self):
+ item = Item.objects.get(image='500x500.jpg')
+ image = ImageFile(item.image.path)
+ val = render_to_string('thumbnail20a.html', {
+ 'image': image,
+ }).strip()
+ im = self.backend.get_thumbnail(image, '32x32', crop='center')
+ self.assertEqual('<img src="%s">' % im.url, val)
+
class TemplateTestCaseA(SimpleTestCaseBase):
def testModel(self):

0 comments on commit cb3c69b

Please sign in to comment.