Hey Andrew,
Thanks for the response.

Responses is indeed a great package. However, responses is needed when you want to test the logic specific to handling the request (status code, serialization etc). In our example that would be testing the actual service.

I think that when testing code that uses the service you are better off mocking the response from the service rather the mocking the response it self.

Written by

Full Stack Developer, Team Leader, Independent. More from me at https://hakibenita.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store