|
@@ 171-181 (lines=11) @@
|
| 168 |
|
|
| 169 |
|
assert instance.image.progressive.url == 'img/image.progressive.jpg' |
| 170 |
|
|
| 171 |
|
def test_progressive_jpeg_from_gif(self): |
| 172 |
|
instance = ProgressiveJpegModel.objects.create( |
| 173 |
|
image=self.fixtures['600x400.gif'] |
| 174 |
|
) |
| 175 |
|
progressive_path = os.path.join(IMG_DIR, 'image.progressive.jpg') |
| 176 |
|
assert os.path.exists(progressive_path) |
| 177 |
|
|
| 178 |
|
progressive_path = os.path.join(IMG_DIR, 'image.progressive.gif') |
| 179 |
|
assert not os.path.exists(progressive_path) |
| 180 |
|
|
| 181 |
|
assert instance.image.progressive.url == 'img/image.progressive.jpg' |
| 182 |
|
|
| 183 |
|
def test_thumbnail_save_without_directory(self): |
| 184 |
|
obj = ThumbnailWithoutDirectoryModel.objects.create( |
|
@@ 159-169 (lines=11) @@
|
| 156 |
|
|
| 157 |
|
assert instance.image.progressive.url == 'img/image.progressive.jpg' |
| 158 |
|
|
| 159 |
|
def test_progressive_jpeg_from_png(self): |
| 160 |
|
instance = ProgressiveJpegModel.objects.create( |
| 161 |
|
image=self.fixtures['600x400.png'] |
| 162 |
|
) |
| 163 |
|
progressive_path = os.path.join(IMG_DIR, 'image.progressive.jpg') |
| 164 |
|
assert os.path.exists(progressive_path) |
| 165 |
|
|
| 166 |
|
progressive_path = os.path.join(IMG_DIR, 'image.progressive.png') |
| 167 |
|
assert not os.path.exists(progressive_path) |
| 168 |
|
|
| 169 |
|
assert instance.image.progressive.url == 'img/image.progressive.jpg' |
| 170 |
|
|
| 171 |
|
def test_progressive_jpeg_from_gif(self): |
| 172 |
|
instance = ProgressiveJpegModel.objects.create( |