Ticket #14330: image_storage_read_binary.diff

File image_storage_read_binary.diff, 712 bytes (added by Gabriel Hurley, 7 years ago)

sets the mode flag to 'rb' for the InconsistentGetImageDimensions test case.

  • tests/regressiontests/file_storage/tests.py

     
    375375            """
    376376            from django.core.files.images import ImageFile
    377377            img_path = os.path.join(os.path.dirname(__file__), "test.png")
    378             image = ImageFile(open(img_path))
     378            image = ImageFile(open(img_path, 'rb'))
    379379            image_pil = Image.open(img_path)
    380380            size_1, size_2 = get_image_dimensions(image), get_image_dimensions(image)
    381381            self.assertEqual(image_pil.size, size_1)
Back to Top