Skip to main content

All Questions

8 votes
3 answers
760 views

Is having a switch to turn mocking on or off a code smell?

I have a method that looks like this: def foobar(mock=False, **kwargs): # ... snipped foobar actually makes several calls to Amazon S3 and returns a composed result. In order to make this ...
Bon Ami's user avatar
  • 317