photo/openphoto-python — pull request #46 by sneakypete81 (2013-07-01 07:38:10+00:00)
Title: Consistency fixes

Issues found when writing unit tests:
* 404 status should raise 404 error, even if JSON is valid
* photos.update/delete should accept a list of Photo objects as well as IDs
* Delete methods should raise exception on failure, rather than returning False
* After deleting an object's fields, name and id should be set to None
* replace_encoded parameter should be called photo_file, not encoded_photo
* Don't test the tag/create endpoint, as it is redundant and will be removed
* Ensure album cover is updated to a Photo object during Album() initialisation
* object.add/remove_photos should accept a photos parameter, even though the method's aren't yet implemented

I attempted to raise an exception if the HTTP return status didn't match the JSON status code, but these mismatches are actually quite common. Instead, the tests now check that the JSON code is correct, and ignore the HTTP return status.