class TestBaseHandler(unittest.TestCase): def setUp(self): self.bansehandler = BaseHandler() def test_format_exception(self): self.assertEqual(self.bansehandler.formatException(IOError('exception-test')), {'type': 'exceptions.IOError', 'message': 'exception-test'}) def test_format_frame(self): f=sys._getframe() print self.bansehandler.formatFrame(f)
def setUp(self): self.bansehandler = BaseHandler()