'Test that log.failure() emits the right data.'

def test_defaultFailure(self):

    log = TestLogger()
    try:
        raise RuntimeError('baloney!')
    except RuntimeError:
        log.failure('Whoops')
    errors = self.flushLoggedErrors(RuntimeError)
    self.assertEqual(len(errors), 1)
    self.assertEqual(log.emitted['level'], LogLevel.critical)
    self.assertEqual(log.emitted['format'], 'Whoops')
