Comment 0 for bug 125637

Revision history for this message
Brad Crittenden (bac) wrote : Replace MockLoggers in tests with zope utilities

Many places in our tests we locally define a MockLogger class. There exist two classes in Zope to support testing log output in tests.

Quoth flacoste:

"There is zope.testing.loggingsupport.InstalledHandler which is best used from doctest.

And there is also zope.testing.loghandler.Handler which is meant to be used with TestCase subclasses.

Both of these work with the logging framework."

We should no longer be locally define MockLogger classes and those currently in use should be replaced with the appropriate zope handler.