Skip to content

Fix connection errors when paginating -- fixes #120 - #125

Merged
jkeyes merged 1 commit into
intercom:version-3from
TyMaszWeb:fix-next-page
Nov 15, 2016
Merged

jkeyes merged 1 commit into
intercom:version-3from
TyMaszWeb:fix-next-page

Conversation

@piotrkilczuk

Copy link
Copy Markdown
Contributor

Solution to #120 provided in #121 does not pass travis tests, so I'm opening this. It uses six to get urlparse from the right location.

side_effect = [page1, page2]
with patch.object(Client, 'get', side_effect=side_effect) as mock_method: # noqa
emails = [user.email for user in self.client.users.all()]
eq_([call('/users', {}), call('https://api.intercom.io/users?per_page=50&page=2', {})], # noqa

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A request with a hostname will fail.

@coveralls

coveralls commented Nov 3, 2016

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.006%) to 95.241% when pulling d067b34 on TyMaszWeb:fix-next-page into 026d22f on jkeyes:version-3.

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.

3 participants