Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • replacing remote_service with a mock is not an issue, python has standard tools for this (patch). i also agree that dependency injection makes this a bit easier. i just wasn't sure if it's worth to make an assertion on that remote_service.get was called with the right params, as the tests won't break in case the remote service API changes. i think in general it's worth to make such assertions (so you can refactor with confidence), but that alone won't be sufficient to refactor remote_service, you need integration tests for that. Commented Jan 28, 2019 at 20:31