I\'m trying to write a simple unit test that will verify that, under a certain condition, a class in my application will log an error via the standard logging API. I can\'t
The ExpectLog class implemented in tornado is a great utility:
ExpectLog
with ExpectLog('channel', 'message regex'): do_it()
http://tornado.readthedocs.org/en/latest/_modules/tornado/testing.html#ExpectLog