Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User.delete() doesn't correct call the Intercom API. #19

Merged
merged 1 commit into from
Nov 18, 2013

Conversation

cameronmaske
Copy link
Contributor

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 '[email protected]' not the email specified ('[email protected]' in the tests case).
Now, the user info returned corresponds to the email specified ('[email protected]') as we would expect, as Intercom API 'Returns the deleted user on success' (as according to their docs).

Intercom._call was not expecting the DELETE method when constructing request data parameters.
Hence, the params were being skipped over and the request didn't correctly register with Intercom's API.

Added in intergration test to check this is working as indetented.
Before,
The user returned would be the '[email protected]' not the email specificed ('[email protected]' in the tests case).
Now,
The user info returned corresponds to the email specified ('[email protected]') as we would expect, as Intercom API 'Returns the deleted user on success' (as according to their docs).
@jkeyes
Copy link
Contributor

jkeyes commented Nov 17, 2013

Ah yes! Good spot. Thanks.

@jkeyes jkeyes merged commit 91693e1 into intercom:master Nov 18, 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.

2 participants