summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2014-04-20 11:59:10 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2014-04-20 11:59:10 +0200
commit42d3d4b8c543850668186440d5a3ce93e2832c5a (patch)
treef3a06acf13f6f164e55b9f9da01ec2929e3ab8bb /tests
parente23b48847dddb27e7dc7400b994c3fd830b0f48f (diff)
downloadfactory-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.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_django.py6
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):