Two-step request in Yelp Service
Closed this issue · 2 comments
mariushegele commented
buerro/services/yelp/test/test_service.py
Line 41 in 1776540
To me it's a bit unintuitive that the yelp services requires two interactions for a request.
I would expect request_businesses
to return the businesses. Instead it is setting them. If this is the way it's meant to be I would rename it to set_businesses
.
I think it could be restructured, though: request_businesses
could get some basic search params and fill them with provided information. You could also think about defining these rather remote-specific base parameters in the remote.
mariushegele commented
You can use the setUpClass
method in tests to reduce duplicate setup code, like setting the service and the remote.
mariushegele commented