-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat(recommend): add client #539
Conversation
6d0075b
to
153f1ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of testing that the _transporter.retry
gets called with the right parameters, do you think it would it be possible to test the actual request being created? This would allow us to reuse the request definitions for the common test suite we're working towards.
You can see the requests that need to be made in this PR for the Ruby client.
@DevinCodes I don't know Python enough to affirm it is. After the step I've tested, the hosts gets randomly assigned and the payload translated to a |
@shortcuts I think you should be able to mock the requester (as you do the transporter rn), and then assert that the request object it gets passed contains the right values (method, path, body,...). I'm not entirely sure though, since I don't know enough Python as well 😅 Perhaps @tkrugg could point in the right direction here? |
last check before mergning? @tkrugg @DevinCodes :D |
25f7c02
to
0560840
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you @shortcuts !
Describe your change
This PR introduces the
Recommend
client with the following methods:get_recommendations
get_related_products
get_frequently_bought_together