diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-04-20 11:59:10 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-04-20 11:59:10 +0200 |
commit | 42d3d4b8c543850668186440d5a3ce93e2832c5a (patch) | |
tree | f3a06acf13f6f164e55b9f9da01ec2929e3ab8bb | |
parent | e23b48847dddb27e7dc7400b994c3fd830b0f48f (diff) | |
download | factory-boy-42d3d4b8c543850668186440d5a3ce93e2832c5a.tar factory-boy-42d3d4b8c543850668186440d5a3ce93e2832c5a.tar.gz |
Fix 'gif' image tests.
The latest pillow has changed the default gif palette, so we'll use a normalized RGB palette instead.
-rw-r--r-- | tests/test_django.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_django.py b/tests/test_django.py index 50a67a3..29453e6 100644 --- a/tests/test_django.py +++ b/tests/test_django.py @@ -445,9 +445,9 @@ class DjangoImageFieldTestCase(unittest.TestCase): self.assertEqual('django/example.jpg', o.animage.name) i = Image.open(os.path.join(settings.MEDIA_ROOT, o.animage.name)) - colors = i.getcolors() - # 169 pixels with color 190 from the GIF palette - self.assertEqual([(169, 190)], colors) + colors = i.convert('RGB').getcolors() + # 169 pixels with rgb(0, 0, 255) + self.assertEqual([(169, (0, 0, 255))], colors) self.assertEqual('GIF', i.format) def test_with_file(self): |