Skip to content

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

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

Merged
merged 1 commit into from
Nov 15, 2016
Merged

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

merged 1 commit into from
Nov 15, 2016

Conversation

piotrkilczuk
Copy link
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.

@@ -30,7 +30,7 @@ def it_keeps_iterating_if_next_link(self):
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
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
Copy link

coveralls commented Nov 3, 2016

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