Skip to content

Commit

Permalink
Add failing test for multiple jpeg conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsmkn authored and codingjoe committed May 31, 2021
1 parent eeaa9a7 commit 3a91926
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,13 @@ def test_convert(self, db):
assert obj.image.thumbnail.path.endswith("img/100.thumbnail.jpeg")
assert obj.image.full.width == 100
assert obj.image.full.height == 100

def test_convert_multiple(self, db):
large = models.JPEGModel.objects.create(image=self.fixtures["600x400.gif"])
small = models.JPEGModel.objects.create(image=self.fixtures["100.gif"])

assert large.image.field._variations["full"] == (None, None)
assert small.image.field._variations["full"] == (None, None)

assert large.image.full.width == 600
assert small.image.full.width == 100

0 comments on commit 3a91926

Please sign in to comment.