jkeyes/python-intercom — pull request #19 by cameronmaske (2013-11-17 14:25:20+00:00)
Title: User.delete() doesn't correct call the Intercom API.

Hi,
Noticed in issue where calling User.delete() was not having the expected behavior (e.g. removing the user from Intercom!).

Tracked it down the the following cause (I've tried my best to explain it, let me know if any of the points require further clarification!).

Intercom._call was not expecting the DELETE method when constructing request data parameters. (line 93 in intercom/intercom.py)
Hence, the params were being skipped over and the request didn't correctly register with Intercom's API.

Added in integration test to check this is working as intended..
Before, the user returned would be the 'bob@example.com' not the email specified ('to-delete@example.com' in the tests case).
Now, the user info returned corresponds to the email specified ('to-delete@example.com') as we would expect, as Intercom API '[Returns the deleted user on success](https://api.intercom.io/docs#deleting_a_user)' (as according to their docs).