Ovakefali13/buerro

Two-step request in Yelp Service

Closed this issue · 2 comments

short_information = self.yelp_service.get_short_information_of_restaurants()

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.

You can use the setUpClass method in tests to reduce duplicate setup code, like setting the service and the remote.