melinath / django-daguerre

On-the-fly image manipulation for Django.
http://django-daguerre.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
85 stars 15 forks source link

Tests for ways that `Image.verify` can fail across different versions of PIL #94

Closed chigby closed 8 years ago

chigby commented 8 years ago

This pull request:

  1. Added mock objects to simulate the different errors PIL raises when it has problems verifying an image.
  2. Retains one test that does the verification without mocking. This is sort of future-proofing in case they change the errors again.
  3. Removed the assertion on Image.verify -- this is not really our code to test.
  4. Removed except Exception which I think casts too broad a net. If we think it is necessary I can put it back.

Fixed #78

melinath commented 8 years ago

This looks good, except that we should remove the restrictions about which version of Pillow to install (from the docs and also from requirements & steup.py)

chigby commented 8 years ago

@melinath Okay, done. When you merge I'll release it.