Skip to content

Consistency fixes#46

Merged
sneakypete81 merged 12 commits intodevelopmentfrom
consistency_fixes
Jul 2, 2013
Merged

Consistency fixes#46
sneakypete81 merged 12 commits intodevelopmentfrom
consistency_fixes

Conversation

@sneakypete81
Copy link
Contributor

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.

@sneakypete81 sneakypete81 merged commit b4861e4 into development Jul 2, 2013
@sneakypete81 sneakypete81 mentioned this pull request Jul 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant