rhelmer/socorro — comment on commit f831575c70cd6336177ee35f31422f69cf258322
File:  line 0
By peterbe:

Use mock (http://pypi.python.org/pypi/mock) to patch the logger instead. No need to mess around with files and tools like `mymock.call_list()` to check that certain things were called. Also, that way you don't have to mess around with sending in a fake urllib but can instead patch urllib and inspect and assert what it was used for.

The only "bad" thing I know of about mock is that it's not until version 0.8 that you can debug what was called. Being able to do that is particularly useful when you're writing the tests because you sometimes get bewildered as to what's going on.